public FileChannelServer(string channel, string directory = null, IFileChannelFormatter formatter = null) { if (string.IsNullOrEmpty(channel)) { throw new ArgumentNullException(nameof(channel)); } if (string.IsNullOrEmpty(directory)) { directory = AppDomain.CurrentDomain.BaseDirectory; } if (formatter == null) { formatter = JsonFileChannelFormatter.Instance; } _dispatcher = new FileChannelServerDispatcher(directory, channel, formatter, OnReciveRequestMessage); _handlers = new Dictionary<string, IFileChannelHandler>(); }
public FileChannelServer(string channel, string directory = null, IFileChannelFormatter formatter = null) { if (string.IsNullOrEmpty(channel)) { throw new ArgumentNullException(nameof(channel)); } if (string.IsNullOrEmpty(directory)) { directory = AppDomain.CurrentDomain.BaseDirectory; } if (formatter == null) { formatter = JsonFileChannelFormatter.Instance; } _dispatcher = new FileChannelServerDispatcher(directory, channel, formatter, OnReciveRequestMessage); _handlers = new Dictionary <string, IFileChannelHandler>(); }