コード例 #1
0
ファイル: AcdAgentHunter.cs プロジェクト: mujiansu/Lync
 /// <summary>
 /// Update collection og Dialog instance
 /// </summary>
 /// <param name="instanceId"></param>
 /// <param name="ar"></param>
 private void AddDialogInstance(Guid instanceId, TryCommitAgentAsyncResult ar)
 {
     lock (_syncRoot)
     {
         _dialogList.Add(instanceId);
         _dictionaryOfTryCommitAsyncResults.Add(instanceId, ar);
     }
 }
コード例 #2
0
ファイル: AcdAgentHunter.cs プロジェクト: mujiansu/Lync
            private IAsyncResult BeginTryCommitAgent(Agent tentativeAgent, AsyncCallback userCallback, object state)
            {
                TryCommitAgentAsyncResult ar = new TryCommitAgentAsyncResult(this, tentativeAgent, userCallback, state);

                ThreadPool.QueueUserWorkItem((waitState) =>
                {
                    var tempAr = waitState as TryCommitAgentAsyncResult;
                    tempAr.Process();
                }, ar);

                return(ar);
            }
コード例 #3
0
ファイル: AcdAgentHunter.cs プロジェクト: mujiansu/Lync
            private InstantMessagingCall EndTryCommitAgent(IAsyncResult ar)
            {
                TryCommitAgentAsyncResult result = ar as TryCommitAgentAsyncResult;

                return(result.EndInvoke());
            }