public ReplierDispatcher(IReplier defaultReplier = null, ConcurrentDictionary <Type, IReplier> repliers = null) { this._defaultReplier = defaultReplier; if (repliers != null && repliers.Count > 0) { foreach (var replier in repliers) { _repliers.TryAdd(replier.Key, replier.Value); } } }
public ExchangeHandlerDispatcher AddReplier(Type type, IReplier replier) { _replierDispatcher.AddReplier(type, replier); return(this); }
public ExchangeHandlerDispatcher(IReplier replier, params IChannelHandler[] handlers) { _replierDispatcher = new ReplierDispatcher(replier); _handlerDispatcher = new ChannelHandlerDispatcher(handlers); _telnetHandler = new TelnetHandlerAdapter(); }
public static Task <IExchangeClient> ConnectAsync(URL url, IChannelHandler handler, IReplier replier) { return(ConnectAsync(url, new ExchangeHandlerDispatcher(replier, handler))); }
public static Task <IExchangeClient> ConnectAsync(string url, IChannelHandler handler, IReplier replier) { return(ConnectAsync(URL.ValueOf(url), handler, replier)); }
public static Task <IExchangeClient> ConnectAsync(URL url, IReplier replier) { return(ConnectAsync(url, new ChannelHandlerAdapter(), replier)); }
public static Task <IExchangeServer> BindAsync(URL url, IChannelHandler handler, IReplier replier) { return(BindAsync(url, new ExchangeHandlerDispatcher(replier, handler))); }
public static Task <IExchangeServer> BindAsync(string url, IChannelHandler handler, IReplier replier) { return(BindAsync(URL.ValueOf(url), handler, replier)); }
public static Task <IExchangeServer> BindAsync(URL url, IReplier replier) { return(BindAsync(url, new ChannelHandlerAdapter(), replier)); }
public ReplierDispatcher AddReplier(Type type, IReplier replier) { _repliers.TryAdd(type, replier); return(this); }