Пример #1
0
        public void TestMethod2()
        {
            try
            {
                var pipe = new UnityWebApiMicroservicePipeline();

                pipe
                .AddChannelIncoming("freddyin", autosetPartition01: false)
                .AttachPriorityPartition(0, 1, 2)
                .AttachCommandUnity(typeof(IHello), new CommandHello(), responseChannel: new Channel("freda", ChannelDirection.Incoming))
                .Revert()
                .AddChannelOutgoing("freddyout", autosetPartition01: false)
                .AttachPriorityPartition(1, 2)
                ;

                var result = pipe.Unity.Resolve(typeof(IHello));
                Assert.IsNotNull(result);
                Assert.IsTrue(((ICommand)result).ResponseChannelId == "freda");

                pipe.Start();

                pipe.Stop();
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Пример #2
0
        public void PipelineUnityWebApi()
        {
            var pipe = new UnityWebApiMicroservicePipeline();

            //pipe.AddSharedService(
            pipe.Start();

            pipe.Stop();
        }
Пример #3
0
        public void PipelineUnityWebApi()
        {
            var pipe = new UnityWebApiMicroservicePipeline();

            pipe
            .AddChannelIncoming("freddyin", autosetPartition01: false)
            .AttachPriorityPartition(0, 1, 2)
            .Revert()
            .AddChannelOutgoing("freddyout", autosetPartition01: false)
            .AttachPriorityPartition(1, 2)
            ;

            pipe.Start();

            pipe.Stop();
        }