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
parentContext
PipeContext
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
addFactory
PayloadFactory<T>The payload factory called if the payload is not present
updateFactory
UpdatePayloadFactory<T>The payload factory called if the payload already exists
Returns
- T
Type Parameters
T
The 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
payloadFactory
PayloadFactory<T>The payload factory, which is only invoked if the payload is not present.
Returns
- T
Type Parameters
T
The 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
payloadType
Type
Returns
TryGetPayload<T>(out T?)
Attempts to get the specified payload type
public virtual bool TryGetPayload<T>(out T? payload) where T : class
Parameters
payload
T
Returns
Type Parameters
T