当前位置: 首页>>代码示例>>C#>>正文


C# IApplicationBuilder.UseBolt方法代码示例

本文整理汇总了C#中IApplicationBuilder.UseBolt方法的典型用法代码示例。如果您正苦于以下问题:C# IApplicationBuilder.UseBolt方法的具体用法?C# IApplicationBuilder.UseBolt怎么用?C# IApplicationBuilder.UseBolt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IApplicationBuilder的用法示例。


在下文中一共展示了IApplicationBuilder.UseBolt方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Configure

 public void Configure(IApplicationBuilder app)
 {
     app.ApplicationServices.GetRequiredService<ILoggerFactory>().AddConsole(LogLevel.Information);
     app.UseBolt(
         b =>
         {
             b.Use<ITestContract, TestContractImplementation>();
         });
 }
开发者ID:geffzhang,项目名称:Bolt,代码行数:9,代码来源:Startup.cs

示例2: Configure

 protected override void Configure(IApplicationBuilder appBuilder)
 {
     appBuilder.UseBolt(h =>
     {
         h.Use<IFiltersContract, FiltersContract>();
     });
 }
开发者ID:geffzhang,项目名称:Bolt,代码行数:7,代码来源:FiltersTestBase.cs

示例3: Configure

 protected override void Configure(IApplicationBuilder appBuilder)
 {
     appBuilder.UseBolt(
         b =>
             {
                 // we are using IDummy inteface on server and IDummyAsync on client, calls should be properly mapped
                 MockInstanceProvider instanceProvider = new MockInstanceProvider { CurrentInstance = Contract.Object };
                 b.Use<IDummy>(instanceProvider);
             });
 }
开发者ID:geffzhang,项目名称:Bolt,代码行数:10,代码来源:AsyncInterfaceTest.cs

示例4: Configure

 protected override void Configure(IApplicationBuilder appBuilder)
 {
     appBuilder.UseBolt(h =>
     {
         h.Use<ITestContract>(InstanceProvider);
     });
 }
开发者ID:yonglehou,项目名称:Bolt,代码行数:7,代码来源:StateLessTest.cs

示例5: Configure

 protected override void Configure(IApplicationBuilder appBuilder)
 {
     appBuilder.UseBolt(h => h.Use<IStreamingService>(InstanceProvider, c =>
     {
         c.Use<HandleErrorMiddleware>();
         c.Use<StreamingMiddleware>();
         c.Use<SerializationMiddleware>();
         c.Use<InstanceProviderMiddleware>();
         c.Use<ActionInvokerMiddleware>();
     }));
 }
开发者ID:yonglehou,项目名称:Bolt,代码行数:11,代码来源:StreamingMiddlewareTest.cs

示例6: Configure

 protected override void Configure(IApplicationBuilder appBuilder)
 {
     appBuilder.UseBolt(h =>
     {
         Factory = new MemorySessionFactory(h.Configuration.Options);
         IContractInvoker contract = h.UseSession<ITestContractStateFull, TestContractStateFull>(Factory);
         InstanceProvider = (SessionInstanceProvider)contract.InstanceProvider;
     });
 }
开发者ID:geffzhang,项目名称:Bolt,代码行数:9,代码来源:SessionTest.cs

示例7: Configure

        protected override void Configure(IApplicationBuilder appBuilder)
        {
            DistributedCache = new Mock<IDistributedCache>(MockBehavior.Strict);
            DistributedSessionStore store = new DistributedSessionStore(
                DistributedCache.Object,
                appBuilder.ApplicationServices.GetRequiredService<ILoggerFactory>());

            appBuilder.UseBolt(
                h =>
                    {
                        h.UseDistributedSession<IDummyContract, DummyContract>(store);
                    });
        }
开发者ID:geffzhang,项目名称:Bolt,代码行数:13,代码来源:DistributedSessionTest.cs


注:本文中的IApplicationBuilder.UseBolt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。