本文整理汇总了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);
}
示例2: Configuration
public void Configuration(IAppBuilder app)
{
app.MapHubs(new HubConfiguration
{
EnableCrossDomain = true
}
);
}
示例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);
}
示例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 } );
}
示例5: Configuration
public void Configuration(IAppBuilder app)
{
var config = new HubConfiguration()
{
EnableDetailedErrors = true
};
app.MapHubs(config);
}
示例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();
}
示例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);
}
示例8: Configuration
// This method name is important
public void Configuration(IAppBuilder app)
{
var config = new HubConfiguration
{
EnableCrossDomain = true
};
app.MapHubs(config);
}
示例9: Configuration
public void Configuration(IAppBuilder app)
{
var config = new HubConfiguration()
{
EnableCrossDomain = true,
EnableDetailedErrors = true
};
app.MapHubs(config);
app.MapConnection<EventIncrementPersistantConnection>("/events/increment");
}
示例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);
}
示例11: Configuration
public void Configuration(IAppBuilder app)
{
HubConfiguration hubConfiguration = new HubConfiguration {
EnableCrossDomain = true,
EnableDetailedErrors = true
};
//GlobalHost.HubPipeline.RequireAuthentication();
//GlobalHost.HubPipeline.AddModule();
app.MapHubs(hubConfiguration);
}
示例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
});
}
示例13: ConfigureApp
protected override void ConfigureApp(IAppBuilder app)
{
var config = new HubConfiguration
{
Resolver = Resolver
};
app.MapHubs(config);
config.Resolver.Register(typeof(IProtectedData), () => new EmptyProtectedData());
}
示例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);
}
示例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);
}