/// <summary> /// Initiates the Acd portal start up operation /// </summary> internal IAsyncResult BeginStartUp(AsyncCallback userCallback, object state) { StartupAsyncResult asyncResult = new StartupAsyncResult(userCallback, state, this); bool firstTime = false; lock (_syncRoot) { if (_portalState == PortalState.Created) { this.UpdatePortalState(PortalState.Starting); _matchMaker = this.Platform.MatchMaker; _agentHunter = new AcdAgentHunter(this, _matchMaker, _logger); firstTime = true; } else { throw new InvalidOperationException("AcdPortal is already being started"); } } if (firstTime) { ThreadPool.QueueUserWorkItem((waitState) => { var tempAr = waitState as StartupAsyncResult; tempAr.Process(); }, asyncResult); } return(asyncResult); }
internal HuntForAgentAsyncResult(AcdAgentHunter hunter, AcdCustomerSession session, List <AgentSkill> requestedSkills, AsyncCallback callback, object state) : base(callback, state) { _agentHunter = hunter; _session = session; _requestedSkills = requestedSkills; }