public ChannelHandler(string name) { HandlerId = $"{name}_{Guid.NewGuid()}"; _methodHandlers = ServiceLocatorBuilder .CreateServiceLocator() .Get <IChannelMethodHandlerCollection>(); }
public ServerThreadCommand(IServiceLocator services, IConsoleWriter writer, IServerCommand initServerCommand) { _services = services; _writer = writer; _initServerCommand = initServerCommand; _methodHandlers = _services.Get <IChannelMethodHandlerCollection>(); }
private void OneTimeSetup(IServiceLocator services) { Debug.Assert(services != null); Debug.Assert(HttpListener.IsSupported); _services = services; _channelLocator = _services.Get <IChannelLocator>(); _methodHandlers = _services.Get <IChannelMethodHandlerCollection>(); _channelHandlers = _services.Get <IChannelHandlerCollection>(); _rootPath = (new FileInfo(AppDomain.CurrentDomain.BaseDirectory)).Directory.Parent.Parent.Parent.FullName; DirectoryInfo logsDirectory = new DirectoryInfo(Path.Combine(_rootPath, "Logs")); if (!Directory.Exists(logsDirectory.FullName)) { logsDirectory.Create(); } }
public ServerChannel() { _methodHandlers = Services.Get <IChannelMethodHandlerCollection>(); _channelHandlers = Services.Get <IChannelHandlerCollection>(); _commandFactory = Services.Get <IServerCommandFactory>(); }
public ServerCommandFactory() { _services = ServiceLocatorBuilder.CreateServiceLocator(); _channelHandlers = _services.Get <IChannelHandlerCollection>(); _methodHandlers = _services.Get <IChannelMethodHandlerCollection>(); }
public ConsoleWriter() { _methodHandlers = ServiceLocatorBuilder .CreateServiceLocator() .Get <IChannelMethodHandlerCollection>(); }