NServiceBus.ConnectorContextExtensions.CreateInvokeHandlerContext C# (CSharp) Method

CreateInvokeHandlerContext() public static method

Creates a IInvokeHandlerContext based on the current context.
public static CreateInvokeHandlerContext ( IInvokeHandlerContext>.this stageConnector, MessageHandler messageHandler, CompletableSynchronizedStorageSession storageSession, IIncomingLogicalMessageContext sourceContext ) : IInvokeHandlerContext
stageConnector IInvokeHandlerContext>.this
messageHandler MessageHandler
storageSession CompletableSynchronizedStorageSession
sourceContext IIncomingLogicalMessageContext
return IInvokeHandlerContext
        public static IInvokeHandlerContext CreateInvokeHandlerContext(this StageConnector<IIncomingLogicalMessageContext, IInvokeHandlerContext> stageConnector, MessageHandler messageHandler, CompletableSynchronizedStorageSession storageSession, IIncomingLogicalMessageContext sourceContext)
        {
            Guard.AgainstNull(nameof(messageHandler), messageHandler);
            Guard.AgainstNull(nameof(storageSession), storageSession);
            Guard.AgainstNull(nameof(sourceContext), sourceContext);

            return new InvokeHandlerContext(messageHandler, storageSession, sourceContext);
        }