Class RuntimePipeline
A runtime pipeline contains a collection of handlers which represent different stages of request and response processing.
public class RuntimePipeline : IDisposable
- Inheritance
-
RuntimePipeline
- Implements
- Inherited Members
Constructors
RuntimePipeline(IPipelineHandler)
Constructor for RuntimePipeline.
public RuntimePipeline(IPipelineHandler handler)
Parameters
handler
IPipelineHandlerThe handler with which the pipeline is initialized.
RuntimePipeline(IPipelineHandler, ILogger)
Constructor for RuntimePipeline.
public RuntimePipeline(IPipelineHandler handler, ILogger logger)
Parameters
handler
IPipelineHandlerThe handler with which the pipeline is initialized.
logger
ILoggerThe logger used to log messages.
RuntimePipeline(IList<IPipelineHandler>)
Constructor for RuntimePipeline.
public RuntimePipeline(IList<IPipelineHandler> handlers)
Parameters
handlers
IList<IPipelineHandler>List of handlers with which the pipeline is initialized.
RuntimePipeline(IList<IPipelineHandler>, ILogger)
Constructor for RuntimePipeline.
public RuntimePipeline(IList<IPipelineHandler> handlers, ILogger logger)
Parameters
handlers
IList<IPipelineHandler>List of handlers with which the pipeline is initialized.
logger
ILoggerThe logger used to log messages.
Properties
Handler
The top-most handler in the pipeline.
public IPipelineHandler Handler { get; }
Property Value
Handlers
Retrieves a list of handlers, in the order of their execution.
public List<IPipelineHandler> Handlers { get; }
Property Value
- List<IPipelineHandler>
Handlers in the current pipeline.
Methods
AddHandler(IPipelineHandler)
Adds a new handler to the top of the pipeline.
public void AddHandler(IPipelineHandler handler)
Parameters
handler
IPipelineHandlerThe handler to be added to the pipeline.
AddHandlerAfter<T>(IPipelineHandler)
Adds a handler after the first instance of handler of type T.
public void AddHandlerAfter<T>(IPipelineHandler handler) where T : IPipelineHandler
Parameters
handler
IPipelineHandlerThe handler to be added to the pipeline.
Type Parameters
T
Type of the handler after which the given handler instance is added.
AddHandlerBefore<T>(IPipelineHandler)
Adds a handler before the first instance of handler of type T.
public void AddHandlerBefore<T>(IPipelineHandler handler) where T : IPipelineHandler
Parameters
handler
IPipelineHandlerThe handler to be added to the pipeline.
Type Parameters
T
Type of the handler before which the given handler instance is added.
Dispose()
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
EnumerateHandlers()
Retrieves current handlers, in the order of their execution.
public IEnumerable<IPipelineHandler> EnumerateHandlers()
Returns
- IEnumerable<IPipelineHandler>
Handlers in the current pipeline.
InvokeAsync<T>(IExecutionContext)
Invokes the pipeline asynchronously.
public Task<T> InvokeAsync<T>(IExecutionContext executionContext) where T : AmazonWebServiceResponse, new()
Parameters
executionContext
IExecutionContextRequest context
Returns
- Task<T>
Response context
Type Parameters
T
InvokeSync(IExecutionContext)
Invokes the pipeline synchronously.
public IResponseContext InvokeSync(IExecutionContext executionContext)
Parameters
executionContext
IExecutionContextRequest context
Returns
- IResponseContext
Response context
RemoveHandler<T>()
Removes the first occurance of a handler of type T.
public void RemoveHandler<T>()
Type Parameters
T
Type of the handler which will be removed.
ReplaceHandler<T>(IPipelineHandler)
Replaces the first occurance of a handler of type T with the given handler.
public void ReplaceHandler<T>(IPipelineHandler handler) where T : IPipelineHandler
Parameters
handler
IPipelineHandlerThe handler to be added to the pipeline.
Type Parameters
T
Type of the handler which will be replaced.