NServiceBus.ConnectorContextExtensions.CreateBatchDispatchContext C# (CSharp) Method

CreateBatchDispatchContext() public static method

Creates a IBatchDispatchContext based on the current context.
public static CreateBatchDispatchContext ( this stageForkConnector, IReadOnlyCollection transportOperations, IIncomingPhysicalMessageContext sourceContext ) : IBatchDispatchContext
stageForkConnector this
transportOperations IReadOnlyCollection
sourceContext IIncomingPhysicalMessageContext
return IBatchDispatchContext
        public static IBatchDispatchContext CreateBatchDispatchContext(this StageForkConnector<ITransportReceiveContext, IIncomingPhysicalMessageContext, IBatchDispatchContext> stageForkConnector, IReadOnlyCollection<TransportOperation> transportOperations, IIncomingPhysicalMessageContext sourceContext)
        {
            Guard.AgainstNull(nameof(transportOperations), transportOperations);
            Guard.AgainstNull(nameof(sourceContext), sourceContext);

            return new BatchDispatchContext(transportOperations, sourceContext);
        }