如何SignalR项目注册它的HTTP处理程序? [英] How does SignalR register its HTTP Handler in the project?

查看:201
本文介绍了如何SignalR项目注册它的HTTP处理程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一个小时,我百思不得其解,为什么SignalR样品code实际工作!我是从的NuGet安装,它就可以工作,这是很好的,但不能看到。

I have been looking for an hour and am baffled why the SignalR sample code actually works! I got it installed from nuget and it just works, which is good but cannot see how.

我看不到任何东西的的Global.asax 的web.config 来注册的HttpHandler。我怀疑这可能是在某些类的静态构造函数和(使用类,这是行不通的,没有code虽然再次)增加了处理程序,但没有看code想不通 - 并为此,我不觉得像在所有的code下去。

I cannot see anything in the global.asax or web.config to register the HttpHandler. I suspect this is probably a static constructor in some class and adds the handler (although again with no code using the class, that will not work), but cannot figure out without looking at the code - and for this, I dont feel like going through all the code.

那么,我错过了?

感谢您的帮助。

推荐答案

好吧,我想通了。

它使用 preApplicationStartMethod 组装属性装入类引导程序注册 HubModule

It uses PreApplicationStartMethod assembly attribute to load class Bootstrapper to register the HubModule.

事实上,在样品我有,它是在 preApplicationStart 做的是从源头code,它是在GitHub上不同的版本(他们已经增加了对OWIN,等于是负荷已有抽象出来的​​分离托管程序集)。

In fact, in the version of samples I have, it is done in PreApplicationStart which is different from the source code that is in the GitHub (they have added support for OWIN, etc hence the loading has been abstracted out to separate hosting assemblies).

这篇关于如何SignalR项目注册它的HTTP处理程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆