moved server init down to base app host

pull/702/head
LukePulverenti 12 years ago
parent 0f6e7c6218
commit 3d9e79c46f

@ -145,8 +145,9 @@ namespace MediaBrowser.Common.Implementations
Resolve<ITaskManager>().AddTasks(GetExports<IScheduledTask>(false)); Resolve<ITaskManager>().AddTasks(GetExports<IScheduledTask>(false));
Resolve<IHttpServer>().Init(GetExports<IRestfulService>(false)); Resolve<IHttpServer>().Init(GetExports<IRestfulService>(false));
Resolve<IServerManager>().AddWebSocketListeners(GetExports<IWebSocketListener>(false));
Resolve<IServerManager>().AddWebSocketListeners(GetExports<IWebSocketListener>()); Resolve<IServerManager>().Start();
} }
/// <summary> /// <summary>

@ -231,7 +231,6 @@ namespace MediaBrowser.Common.Kernel
await OnComposablePartsLoaded().ConfigureAwait(false); await OnComposablePartsLoaded().ConfigureAwait(false);
ServerManager = ApplicationHost.Resolve<IServerManager>(); ServerManager = ApplicationHost.Resolve<IServerManager>();
ServerManager.Start();
} }
/// <summary> /// <summary>

@ -127,17 +127,6 @@ namespace MediaBrowser.ServerApplication
RegisterSingleInstance(ServerFactory.CreateServer(this, ProtobufSerializer, Logger, "Media Browser", "index.html"), false); RegisterSingleInstance(ServerFactory.CreateServer(this, ProtobufSerializer, Logger, "Media Browser", "index.html"), false);
} }
/// <summary>
/// Finds the parts.
/// </summary>
protected override void FindParts()
{
Resolve<ITaskManager>().AddTasks(GetExports<IScheduledTask>(false));
Resolve<IHttpServer>().Init(GetExports<IRestfulService>(false));
Resolve<IServerManager>().AddWebSocketListeners(GetExports<IWebSocketListener>(false));
}
/// <summary> /// <summary>
/// Restarts this instance. /// Restarts this instance.
/// </summary> /// </summary>

Loading…
Cancel
Save