public void Start() { _server.StartHosting(null); Thread.Sleep(4000); ServerLoggerFactory.Init(); var methodHandlers = _services.Get <IChannelMethodHandlerCollection>().AsList(); var initiatedHandlers = _services.Get <IInitiatedHandlersCollection>(); methodHandlers.ForEach(handler => { var channelName = handler.Url.Split('/')[4]; var isProtected = "ServerChannel".Equals(channelName, StringComparison.OrdinalIgnoreCase) || "PluginsChannel".Equals(channelName, StringComparison.OrdinalIgnoreCase); initiatedHandlers.AddHandler(handler.HandlerId, handler.Url, handler.StateName, isProtected); }); }
public ServerChannel() { _logger = ServerLoggerFactory.CreateLogger("ServerChannel"); }