From 7bca933af0f1b85e289306ae482db8846f94026c Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Fri, 1 Mar 2013 21:44:46 -0500 Subject: added the beginning of a service stack abstraction --- MediaBrowser.Common.Implementations/HttpServer/HttpServer.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MediaBrowser.Common.Implementations/HttpServer/HttpServer.cs') diff --git a/MediaBrowser.Common.Implementations/HttpServer/HttpServer.cs b/MediaBrowser.Common.Implementations/HttpServer/HttpServer.cs index c0f075c5a..785ca56c6 100644 --- a/MediaBrowser.Common.Implementations/HttpServer/HttpServer.cs +++ b/MediaBrowser.Common.Implementations/HttpServer/HttpServer.cs @@ -511,6 +511,11 @@ namespace MediaBrowser.Common.Implementations.HttpServer EndpointHost.ConfigureHost(this, ServerName, CreateServiceManager()); ContentTypeFilters.Register(ContentType.ProtoBuf, (reqCtx, res, stream) => ProtobufSerializer.SerializeToStream(res, stream), (type, stream) => ProtobufSerializer.DeserializeFromStream(stream, type)); + foreach (var route in services.SelectMany(i => i.GetRoutes())) + { + Routes.Add(route.RequestType, route.Path, route.Verbs); + } + Init(); } } -- cgit v1.2.3