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


C# IAppBuilder.MapHubs方法代码示例

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


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

示例1: Configuration

 public void Configuration(IAppBuilder app)
 {
     // Turn cross domain on
     var config = new HubConfiguration { EnableCrossDomain = true };
     // This will map out to http://localhost:8080/signalr by default
     app.MapHubs(config);
 }
开发者ID:shayananique,项目名称:SignalRServer,代码行数:7,代码来源:Program.cs

示例2: Configuration

 public void Configuration(IAppBuilder app)
 {
     app.MapHubs(new HubConfiguration
             {
                  EnableCrossDomain = true
             }
     );
 }
开发者ID:rogertinsley,项目名称:SignalR,代码行数:8,代码来源:Startup.cs

示例3: Configuration

 public void Configuration(IAppBuilder app)
 {
     var config = new HubConfiguration { EnableCrossDomain = true };
     app.MapHubs(config);
     string exeFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
     string webFolder = Path.Combine(exeFolder, "Web");
     app.UseStaticFiles(webFolder);
 }
开发者ID:Chetanvs,项目名称:signalr-owin-dncmag-07,代码行数:8,代码来源:Startup.cs

示例4: Configuration

        public void Configuration(IAppBuilder app)
        {
            // web host uses BuildManagerAssemblyLocator, we need a manual way, somehow
            var a = Assembly.LoadFrom("ConvRse.Services.dll");

            app.MapConnection<ChatConnection>("/rawchat", new ConnectionConfiguration { EnableCrossDomain = true });
            app.MapHubs(new HubConfiguration { EnableCrossDomain = true } );
        }
开发者ID:ChristianWeyer,项目名称:SignalR_convRse,代码行数:8,代码来源:Startup.cs

示例5: Configuration

 public void Configuration(IAppBuilder app)
 {
     var config = new HubConfiguration()
                  {
                      EnableDetailedErrors = true
                  };
     app.MapHubs(config);
 }
开发者ID:rwecho,项目名称:Windows-Phone-Samples,代码行数:8,代码来源:Startup.cs

示例6: Configuration

        public void Configuration(IAppBuilder app)
        {
            // Any connection or hub wire up and configuration should go here
              //Use the line below to use signalr only.
            //app.MapSignalR();

            GlobalHost.DependencyResolver.UseRedis("localhost", 6379, string.Empty, "myApp");
            app.MapHubs();
        }
开发者ID:jun78,项目名称:SignalrWithRedisForWindows,代码行数:9,代码来源:Startup.cs

示例7: Configuration

        public void Configuration(IAppBuilder app)
        {
            // Map the hubs first, otherwise Nancy grabs them and you get a 404.
            var configuration = new HubConfiguration { EnableDetailedErrors = true };
            app.MapHubs(configuration);

            var bootstrapper = new Bootstrapper();
            app.UseNancy(bootstrapper);
        }
开发者ID:tleviathan,项目名称:nancy-owin-signalr-chat,代码行数:9,代码来源:Startup.cs

示例8: Configuration

        // This method name is important
        public void Configuration(IAppBuilder app)
        {
            var config = new HubConfiguration
            {
                EnableCrossDomain = true
            };

            app.MapHubs(config);
        }
开发者ID:haseebshujja,项目名称:Samples,代码行数:10,代码来源:Startup.cs

示例9: Configuration

 public void Configuration(IAppBuilder app)
 {
     var config = new HubConfiguration()
     {
         EnableCrossDomain = true,
         EnableDetailedErrors = true
     };
     app.MapHubs(config);
     app.MapConnection<EventIncrementPersistantConnection>("/events/increment");
 }
开发者ID:ryantomlinson,项目名称:EventStreamR,代码行数:10,代码来源:Program.cs

示例10: Configuration

        public void Configuration(IAppBuilder app)
        {
            // Any connection or hub wire up and configuration should go here

            var config = new Microsoft.AspNet.SignalR.HubConfiguration();
            config.EnableCrossDomain = false;
            config.EnableDetailedErrors = true;
            config.EnableJavaScriptProxies = true;

            app.MapHubs("/signalr", config);
        }
开发者ID:joinabhimanyu,项目名称:SignalRChat,代码行数:11,代码来源:Startup.cs

示例11: Configuration

 public void Configuration(IAppBuilder app)
 {
     HubConfiguration hubConfiguration = new HubConfiguration { 
         EnableCrossDomain = true,
         EnableDetailedErrors = true
     };
     //GlobalHost.HubPipeline.RequireAuthentication();
     //GlobalHost.HubPipeline.AddModule();
                                 
     app.MapHubs(hubConfiguration);                        
 }
开发者ID:RickStrahl,项目名称:Westwind.QueueMessageManager,代码行数:11,代码来源:SignalRStartup.cs

示例12: Configuration

            public void Configuration(IAppBuilder builder)
            {
                // TODO: load hub settings from configuration

                builder.MapHubs(new HubConfiguration
                {
                    EnableCrossDomain = Server.Configuration.Server.EventBroker.EnableCrossDomain,
                    EnableDetailedErrors = Server.Configuration.Server.EventBroker.EnableDetailedErrors,
                    EnableJavaScriptProxies = Server.Configuration.Server.EventBroker.EnableJavaScriptProxies
                });
            }
开发者ID:sellmeadog,项目名称:eventing,代码行数:11,代码来源:Server.cs

示例13: ConfigureApp

        protected override void ConfigureApp(IAppBuilder app)
        {
            var config = new HubConfiguration
            {
                Resolver = Resolver
            };

            app.MapHubs(config);

            config.Resolver.Register(typeof(IProtectedData), () => new EmptyProtectedData());
        }
开发者ID:hallco978,项目名称:SignalR,代码行数:11,代码来源:MemoryHostHubInvocationRun.cs

示例14: Configuration

        public void Configuration(IAppBuilder builder)
        {
            var a = Assembly.LoadFrom("Todo.Services.dll");
            var hubConfig = new HubConfiguration { EnableCrossDomain = true };
            builder.MapHubs(hubConfig);

            var webApiConfig = new HttpConfiguration();
            WebApiConfig.Register(webApiConfig);
            SecurityConfig.Register(webApiConfig);
            webApiConfig.EnableCors(new EnableCorsAttribute());
            builder.UseWebApi(webApiConfig);
        }
开发者ID:ChristianWeyer,项目名称:tUdUs,代码行数:12,代码来源:TodoSelfHostService.cs

示例15: Configuration

 public void Configuration(IAppBuilder app)
 {
     ContainerOptions containerOptions = new ContainerOptions();
     Container container = new Container(containerOptions);
     container.InstallIrisDependency();
     var hubConfig = new Microsoft.AspNet.SignalR.HubConfiguration()
     {
         EnableCrossDomain = true,
         Resolver = new SimpleInjectorSignalR(container)
     };
     app.MapHubs("/server",hubConfig);
 }
开发者ID:Nepomuceno,项目名称:Iris,代码行数:12,代码来源:Startup.cs


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