コード例 #1
0
ファイル: CallTransferBasic.cs プロジェクト: mujiansu/Lync
        private void EndTransferCall(IAsyncResult ar)
        {
            AudioVideoCall audioVideoCall = ar.AsyncState as AudioVideoCall;

            try
            {
                // End transferring the incoming call.
                audioVideoCall.EndTransfer(ar);
            }
            catch (OperationFailureException OpFailEx)
            {
                // Operation failure exception can occur when the far end transfer
                // does not complete successfully, usually due to the transferee failing to pick up.
                Console.WriteLine(OpFailEx.ToString());
            }
            catch (RealTimeException realTimeEx)
            {
                // Real time exception can occur when the far end transfer does
                // not complete successfully, usually due to a link-layer or
                // transport failure (i.e: Link dead, or failure response.).
                Console.WriteLine(realTimeEx.ToString());
            }
            finally
            {
                //Again, just to sync the completion of the code.
                _waitForTransferComplete.Set();
            }
        }
コード例 #2
0
        private void TransferCallCompleted(IAsyncResult ar)
        {
            AudioVideoCall audioVideoCall = ar.AsyncState as AudioVideoCall;

            try
            {
                // End transferring the incoming call.
                audioVideoCall.EndTransfer(ar);
            }
            catch (OperationFailureException OpFailEx)
            {
                // Operation failure exception can occur when the far end transfer
                // does not complete successfully, usually due to the transferee
                // failing to pick up.
                Console.WriteLine(OpFailEx.ToString());
            }

            // Again, just to sync the completion of the code.
            _sampleCompleted.Set();
        }