/// <summary> /// Creates a queued thread pool job that will disconnect a connection for the address book item /// </summary> /// <param name="item"></param> public virtual void Disconnect(AddressBookItem item) { BackgroundThreadPoolJob job = new BackgroundThreadPoolJob( item.Id, true, this, new object[] { item }, new BackgroundThreadStartEventHandler(OnDisconnectSessionForAddressBookItem), null); _threadPool.QueueJob(job); }
/// <summary> /// Creates a queued thread pool job that will connect a connection for the address book item /// </summary> /// <param name="item"></param> /// <param name="disconnectFirst"></param> public virtual void Connect(AddressBookItem item, bool disconnectFirst, bool verboseSession, bool autoRecv) { BackgroundThreadPoolJob job = new BackgroundThreadPoolJob( item.Id, true, this, new object[] { item, disconnectFirst, verboseSession, autoRecv }, new BackgroundThreadStartEventHandler(OnConnectSessionForAddressBookItem), null); _threadPool.QueueJob(job); }