예제 #1
0
 /// <summary>
 /// Method to start the work of retrieving new data.
 /// </summary>
 private void StartRetrievingNewData()
 {
     lock (m_syncRoot)
     {
         ContactCenterDiscoveryAsyncResult asyncResult = new ContactCenterDiscoveryAsyncResult(this.LocalEndpoint, this.ContactCenterUri, this.RetrieveCompleted, null /*state*/);
         asyncResult.Process();
     }
 }
예제 #2
0
 /// <summary>
 /// Callback method after data retrieval is complete.
 /// </summary>
 /// <param name="asyncResult">Async result refrence.</param>
 private void RetrieveCompleted(IAsyncResult asyncResult)
 {
     lock (m_syncRoot)
     {
         ContactCenterDiscoveryAsyncResult contactCenterDiscoveryAsyncResult = asyncResult as ContactCenterDiscoveryAsyncResult;
         if (contactCenterDiscoveryAsyncResult.Exception == null)
         {
             //Update only in successful cases.
             m_contactCenterInformation = contactCenterDiscoveryAsyncResult.EndInvoke();
         }
     }
 }