public Messenger(IConnecter <IDialog> connecter, IMessageStream <IMessage> messageStream, IUsersManager usersManager, IInteracter interacter) { this.connecter = connecter; this.messageStream = messageStream; this.usersManager = usersManager; this.interacter = interacter; }
public TranslatorDirectedItemsToMdSelection(IConnecter connecter, IConverter <Connection, MarkdownConnection> converter, IFilter <MarkdownConnection> filter, IHandlerConnections <MarkdownConnection, MdConvertedItem> handler) { RaiseIfGivenArgumentsAreIncorrect(connecter, converter, filter, handler); this.connecter = connecter; this.converter = converter; this.filter = filter; this.handler = handler; }
/// <summary> /// 构造函数 /// </summary> /// <param name="connecter">连接管理类</param> /// <param name="rawServer">服务器类</param> /// <param name="myID">本地下载工具ID号</param> /// <param name="maxLength">最大请求子片断长度</param> /// <param name="scheduleFunction">计划函数</param> /// <param name="keepAliveDelay">发送keep alive信息的时间间隔</param> /// <param name="downloadID">对方下载工具ID号</param> /// <param name="maxInitiate">最大连接数</param> public Encrypter(IConnecter connecter, IRawServer rawServer, byte[] myID, int maxLength, SchedulerDelegate scheduleFunction, double keepAliveDelay, byte[] downloadID, int maxInitiate) { this.rawServer = rawServer; this.Connecter = connecter; this.MyID = myID; this.maxLength = maxLength; this.scheduleFunction = scheduleFunction; this.keepAliveDelay = keepAliveDelay; this.DownloadID = downloadID; this.maxInitiate = maxInitiate; this.connections = new Dictionary <ISingleSocket, IEncryptedConnection>(); scheduleFunction(SendKeepAlives, keepAliveDelay, "Send keep alives"); }
private void RaiseIfGivenArgumentsAreIncorrect(IConnecter connecter, IConverter <Connection, MarkdownConnection> converter, IFilter <MarkdownConnection> filter, IHandlerConnections <MarkdownConnection, MdConvertedItem> handler) { if (connecter == null) { throw new ArgumentException("Connector should not be a null"); } if (converter == null) { throw new ArgumentException("Converter should not be a null"); } if (filter == null) { throw new ArgumentException("Filter should not be a null"); } if (handler == null) { throw new ArgumentException("Handle should not be a null"); } }
static object Access(IConnecter Ic) { var c = Ic.Ping(); return(c); }
static object Access(IConnecter Ic) { var c = Ic.Ping(); return c; }
/// <summary> /// 构造函数 /// </summary> /// <param name="encryptedConnection">封装连接类</param> /// <param name="connecter">连接管理类</param> public Connection(IEncryptedConnection encryptedConnection, IConnecter connecter) { this.encryptedConnection = encryptedConnection; this.connecter = connecter; this.getAnything = false; }