示例#1
0
        public WebSocketRouteCollection BuildRoutes()
        {
            var collection = new WebSocketRouteCollection();

            foreach (var kvp in handlers)
            {
                var template = TemplateParser.Parse(kvp.Key);
                collection.Register(template, kvp.Value);
            }

            return(collection);
        }
示例#2
0
 public WebSocketHandlerResolver(WebSocketRouteCollection routeCollection, IServiceProvider provider)
 {
     this._routeCollection = routeCollection;
     this.provider         = provider;
 }