Class PipelineTransport
Represents an HTTP pipeline transport used to send and receive HTTP requests and responses.
Namespace: System.Dynamic.ExpandoObject
Assembly: System.ClientModel.dll
Syntax
[System.Runtime.CompilerServices.Nullable(0)]
[System.Runtime.CompilerServices.NullableContext(1)]
public abstract class PipelineTransport : System.ClientModel.Primitives.PipelinePolicy
Constructors
PipelineTransport()
PipelineTransport(Boolean, ILoggerFactory)
Creates a new instance of the PipelineTransport class.
Declaration
[System.Runtime.CompilerServices.NullableContext(2)]
protected PipelineTransport (bool enableLogging, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
Parameters
System.Boolean
enableLogging
If client-wide logging is enabled for this pipeline. |
Microsoft.Extensions.Logging.ILoggerFactory
loggerFactory
The Microsoft.Extensions.Logging.ILoggerFactory to use to create an Microsoft.Extensions.Logging.ILogger instance for logging. If one is not provided, logs are written to Event Source by default. |
Methods
CreateMessage()
Create an instance of PipelineMessage that can be sent using this transport instance. This method will rarely be called directly; CreateMessage() should be called instead.
Declaration
public System.ClientModel.Primitives.PipelineMessage CreateMessage ();
Returns
PipelineMessage
A PipelineMessage that can be passed to Process(PipelineMessage). |
CreateMessageCore()
Creates a new transport-specific instance of PipelineMessage. Types that derive from PipelineTransport must implement this method to provide transport-specific functionality.
Declaration
protected abstract System.ClientModel.Primitives.PipelineMessage CreateMessageCore ();
Returns
PipelineMessage
A PipelineMessage that can be passed to Process(PipelineMessage). |
Process(PipelineMessage)
Declaration
public void Process (System.ClientModel.Primitives.PipelineMessage message);
Parameters
PipelineMessage
message
The PipelineMessage containing the request that was sent and response that was received by the transport. |
Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32)
Implementation of Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32). Since the transport is the last policy in the ClientPipeline policy chain, this method does not call ProcessNext(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) as other policy implementations do.
Declaration
public override sealed void Process (System.ClientModel.Primitives.PipelineMessage message, System.Collections.Generic.IReadOnlyList<System.ClientModel.Primitives.PipelinePolicy> pipeline, int currentIndex);
Parameters
PipelineMessage
message
The PipelineMessage to pass to Process(PipelineMessage). |
System.Collections.Generic.IReadOnlyList<PipelinePolicy>
pipeline
The collection of policies in the pipeline. |
System.Int32
currentIndex
The index of the current policy being processed in the pipeline invocation. |
ProcessAsync(PipelineMessage)
Declaration
[System.Diagnostics.DebuggerStepThrough]
public System.Threading.Tasks.ValueTask ProcessAsync (System.ClientModel.Primitives.PipelineMessage message);
Parameters
PipelineMessage
message
The PipelineMessage containing the request that was sent and response that was received by the transport. |
Returns
System.Threading.Tasks.ValueTask
|
ProcessAsync(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32)
Implementation of Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32). Since the transport is the last policy in the ClientPipeline policy chain, this method does not call ProcessNext(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) as other policy implementations do.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public override sealed System.Threading.Tasks.ValueTask ProcessAsync (System.ClientModel.Primitives.PipelineMessage message, System.Collections.Generic.IReadOnlyList<System.ClientModel.Primitives.PipelinePolicy> pipeline, int currentIndex);
Parameters
PipelineMessage
message
The PipelineMessage to pass to Process(PipelineMessage). |
System.Collections.Generic.IReadOnlyList<PipelinePolicy>
pipeline
The collection of policies in the pipeline. |
System.Int32
currentIndex
The index of the current policy being processed in the pipeline invocation. |
Returns
System.Threading.Tasks.ValueTask
|
ProcessCore(PipelineMessage)
Transport-specific implementation used to sends the HTTP request contained by Request and set the value of Response. Types that derive from PipelineTransport must implement this method to provide transport-specific functionality.
Declaration
protected abstract void ProcessCore (System.ClientModel.Primitives.PipelineMessage message);
Parameters
PipelineMessage
message
The PipelineMessage containing the request that was sent and response that was received by the transport. |
ProcessCoreAsync(PipelineMessage)
Transport-specific implementation used to sends the HTTP request contained by Request and set the value of Response. Types that derive from PipelineTransport must implement this method to provide transport-specific functionality.
Declaration
protected abstract System.Threading.Tasks.ValueTask ProcessCoreAsync (System.ClientModel.Primitives.PipelineMessage message);
Parameters
PipelineMessage
message
The PipelineMessage containing the request that was sent and response that was received by the transport. |
Returns
System.Threading.Tasks.ValueTask
|