Class ProxyPipeContext
- Namespace
- MassTransit.Middleware
- Assembly
- MassTransit.Abstractions.dll
The base for any pipe context proxy, optimized to avoid member access
public abstract class ProxyPipeContext
- Inheritance
-
ProxyPipeContext
- Derived
- Inherited Members
Constructors
ProxyPipeContext(PipeContext)
The parent pipe context for this proxy
protected ProxyPipeContext(PipeContext parentContext)
Parameters
parentContextPipeContext
Properties
CancellationToken
Returns the CancellationToken for the context (implicit interface)
public virtual CancellationToken CancellationToken { get; }
Property Value
Methods
AddOrUpdatePayload<T>(PayloadFactory<T>, UpdatePayloadFactory<T>)
Either adds a new payload, or updates an existing payload
public virtual T AddOrUpdatePayload<T>(PayloadFactory<T> addFactory, UpdatePayloadFactory<T> updateFactory) where T : class
Parameters
addFactoryPayloadFactory<T>The payload factory called if the payload is not present
updateFactoryUpdatePayloadFactory<T>The payload factory called if the payload already exists
Returns
- T
Type Parameters
TThe payload type
GetOrAddPayload<T>(PayloadFactory<T>)
Get or add a payload to the context, using the provided payload factory.
public virtual T GetOrAddPayload<T>(PayloadFactory<T> payloadFactory) where T : class
Parameters
payloadFactoryPayloadFactory<T>The payload factory, which is only invoked if the payload is not present.
Returns
- T
Type Parameters
TThe payload type
HasPayloadType(Type)
Returns true if the payload type is included with or supported by the context type
public virtual bool HasPayloadType(Type payloadType)
Parameters
payloadTypeType
Returns
TryGetPayload<T>(out T?)
Attempts to get the specified payload type
public virtual bool TryGetPayload<T>(out T? payload) where T : class
Parameters
payloadT
Returns
Type Parameters
T