예제 #1
0
    public Task BatchDispatchContext()
    {
        var context = new TestableBatchDispatchContext();

        context.Operations.Add(BuildTransportOperation());
        return(Verify(context));
    }
    public Task BatchDispatchContext()
    {
        var context = new TestableBatchDispatchContext();

        context.Operations.Add(BuildTransportOperation());
        context.Extensions.Set("key", "value");
        return(Verify(context));
    }
예제 #3
0
            public async Task Invoke(ITransportReceiveContext context, Func <IIncomingPhysicalMessageContext, Task> next)
            {
                context.PrintInstanceWithRunSpecificIfPossible(instance, writer);

                var physicalMessageContext = new TestableIncomingPhysicalMessageContext();

                physicalMessageContext.Extensions.Merge(context.Extensions);

                await next(physicalMessageContext).ConfigureAwait(false);

                var dispatchContext = new TestableBatchDispatchContext();

                dispatchContext.Extensions.Merge(context.Extensions);

                await this.Fork(dispatchContext).ConfigureAwait(false);
            }