Пример #1
0
        public void Configuration(IAppBuilder app)
        {
            try
            {
                var pipe = new WebApiMicroservicePipeline();

                pipe
                .CallOut(Hello1)
                .Condition((c) => c.AuthIssuer() == null, IsTrue, IsFalse)
                .AddChannelIncoming("mom")
                .CallOut(Hello2)
                .Condition((c) => c.TcpTlsConnection() == null, IsTrueEx, IsFalseEx)

                ;


                //RouteConfig.Register(Service);

                //SwaggerConfig.Register(Service);

                //Service.Start(app, AzureHelper.Resolver);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
        public void PipelineWebApi()
        {
            var pipe = new WebApiMicroservicePipeline();

            pipe.Start();

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

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

            pipe.Start();

            pipe.Stop();
        }
Пример #4
0
        public void Configuration(IAppBuilder app)
        {
            var webpipe = new WebApiMicroservicePipeline();

            webpipe
            .AddDebugMemoryDataCollector(out mDataCollector)
            .ApiAddBoundaryLoggerFilter()
            .ApiConfig((c) => c.Routes.MapHttpRoute("Default", "api/{controller}/{id}", new { id = RouteParameter.Optional }))
            .ApiAddMicroserviceUnavailableFilter()
            .ApiAddJwtTokenAuthentication(JwtHashAlgorithm.HS256, mSecret, audience: JwtTests.Audience)
            .ApiAddCorrelationIdFilter()
            //.AddChannelIncoming("Incoming")
            //    .AttachPersistenceManagerHandlerMemory((ResourceEvent ev) => ev.Name, (s) => s, resourceProfile: "Resource1")
            ;

            webpipe.StartWebApi(app);
        }
Пример #5
0
        public void Configuration(IAppBuilder app)
        {
            try
            {
                var Service = new WebApiMicroservicePipeline();

                RouteConfig.Register(Service);

                SwaggerConfig.Register(Service);

                Service.Start();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #6
0
 private void IsFalse(WebApiMicroservicePipeline pipe)
 {
 }
Пример #7
0
 private void IsTrue(WebApiMicroservicePipeline pipe)
 {
 }
Пример #8
0
 private void Hello1(WebApiMicroservicePipeline pipe)
 {
 }