示例#1
0
        protected void Application_Start(object sender, EventArgs e)
        {
            var dynamicProvider = new RelayDescriptorProvider();
            GlobalHost.DependencyResolver.Register(typeof(IHubDescriptorProvider), () => dynamicProvider);
            var methodProvier = new RelayMethodDescriptorProvider();
            GlobalHost.DependencyResolver.Register(typeof(IMethodDescriptorProvider), () => methodProvier);

            RouteTable.Routes.MapHubs();
        }
示例#2
0
        protected void Application_Start(object sender, EventArgs e)
        {
            var dynamicProvider = new RelayDescriptorProvider();

            GlobalHost.DependencyResolver.Register(typeof(IHubDescriptorProvider), () => dynamicProvider);
            var methodProvier = new RelayMethodDescriptorProvider();

            GlobalHost.DependencyResolver.Register(typeof(IMethodDescriptorProvider), () => methodProvier);
        }