/// <summary> /// 构造函数 /// </summary> private RequestManager() { this.requestQueue = new MemoryRequestQueue(); this.deadLetterQueue = new MemoryRequestQueue(); this.connectionManager = new ConnectionManager(new WinNetDetectionStrategy(), 1); this.dispatchCommands = new Queue<Command>(); this.requestDispatcher = new OfflineRequestDispatcher(); this.connectionManager.Start(); }
/// <summary> /// Constructor for ConnectionDetector /// </summary> /// <param name="connectionDetectionStrategy">The detection strategy chosen through the config file</param> /// <param name="connectionManager">The connection manager instance</param> public ConnectionDetector(IConnectionDetectionStrategy connectionDetectionStrategy, ConnectionManager connectionManager) { this.connectionDetectionStrategy = connectionDetectionStrategy; this.connectionManager = connectionManager; }