コード例 #1
0
        public void InvokeBehavior(IBuilder builder)
        {
            var runner = new UnitOfWorkBehavior();

            var context = new IncomingContext(new RootContext(builder), new TransportMessage());

            runner.Invoke(context, () => { });
        }
コード例 #2
0
        public void InvokeBehavior(IBuilder builder)
        {
            var runner = new UnitOfWorkBehavior();

            var context = new ReceivePhysicalMessageContext(new RootContext(builder), new TransportMessage(), false);

            runner.Invoke(context, () => { });
        }
コード例 #3
0
        public void InvokeBehavior(IBuilder builder)
        {
            var runner = new UnitOfWorkBehavior();

            var context = new ReceivePhysicalMessageContext(new RootContext(builder), new TransportMessage(), false);

            runner.Invoke(context, () => { });
        }
コード例 #4
0
        public void InvokeBehavior(IBuilder builder)
        {
            var runner = new UnitOfWorkBehavior();

            using (var context = new BehaviorContext(builder, new TransportMessage(), new BehaviorContextStacker()))
            {
                runner.Invoke(context, () => { });
            }
        }
コード例 #5
0
        public void InvokeBehavior(IBuilder builder)
        {
            var runner = new UnitOfWorkBehavior();

            using (var context = new BehaviorContext(builder, new TransportMessage(), new BehaviorContextStacker()))
            {
                runner.Invoke(context, () => { });
            }
        }
コード例 #6
0
        public void InvokeBehavior(IBuilder builder)
        {
            var runner = new UnitOfWorkBehavior();

            var context = new IncomingContext(new RootContext(builder), new TransportMessage());

            runner.Invoke(context, () => { });

        }
コード例 #7
0
        static Task InvokeBehavior(FakeBuilder builder, Exception toThrow = null)
        {
            var runner = new UnitOfWorkBehavior();

            var context = new TestableIncomingPhysicalMessageContext();

            context.Builder = builder;

            return(runner.Invoke(context, ctx =>
            {
                if (toThrow != null)
                {
                    throw toThrow;
                }
                return TaskEx.CompletedTask;
            }));
        }
コード例 #8
0
        static Task InvokeBehavior(FakeBuilder builder, Exception toThrow = null, bool hasUnitsOfWork = true)
        {
            var runner = new UnitOfWorkBehavior(hasUnitsOfWork);

            var context = new TestableIncomingPhysicalMessageContext();
            context.Builder = builder;

            return runner.Invoke(context, ctx =>
            {
                if (toThrow != null)
                {
                    throw toThrow;
                }
                return TaskEx.CompletedTask;
            });
        }
 public Task Invoke()
 {
     return(UnitOfWorkBehavior.Invoke(Context, NextTask.Object));
 }