AudioVideoFlow.BeginHold Method

Definition

Overloads

BeginHold(HoldType, AsyncCallback, Object)

Begins to hold the AudioVideoFlow.

BeginHold(HoldType, IEnumerable<SignalingHeader>, AsyncCallback, Object)

Begins to hold the AudioVideoFlow.

BeginHold(HoldType, AsyncCallback, Object)

Begins to hold the AudioVideoFlow.

public:
 IAsyncResult ^ BeginHold(Microsoft::Rtc::Collaboration::AudioVideo::HoldType holdType, AsyncCallback ^ userCallback, System::Object ^ state);
public IAsyncResult BeginHold (Microsoft.Rtc.Collaboration.AudioVideo.HoldType holdType, AsyncCallback userCallback, object state);
member this.BeginHold : Microsoft.Rtc.Collaboration.AudioVideo.HoldType * AsyncCallback * obj -> IAsyncResult

Parameters

holdType
HoldType

The type of hold to be used.

userCallback
AsyncCallback

The method to be called when the asynchronous operation is completed.

state
Object

A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.

Returns

An IAsyncResult that references the asynchronous operation.

Exceptions

Thrown when the AudioVideoFlow is not in the Active state or when there is already an asynchronous operation in progress.

Thrown when the holdType argument value is not a value in the HoldType enumerated type.

Examples

The following example puts the call on hold.

C# Putting a call on hold.


audioVideoFlow.BeginHold(
    HoldType.BothEndpoints, 
    new AsyncCallback(delegate(IAsyncResult result)
    {
        try
        {
            audioVideoFlow.EndHold(result);
        }
        catch (RealTimeException e)
        {
            // handle exception
            throw e;
        }

        // audioVideoFlow is now on hold
    }),
    this);



Applies to

BeginHold(HoldType, IEnumerable<SignalingHeader>, AsyncCallback, Object)

Begins to hold the AudioVideoFlow.

public:
 IAsyncResult ^ BeginHold(Microsoft::Rtc::Collaboration::AudioVideo::HoldType holdType, System::Collections::Generic::IEnumerable<Microsoft::Rtc::Signaling::SignalingHeader ^> ^ headers, AsyncCallback ^ userCallback, System::Object ^ state);
public IAsyncResult BeginHold (Microsoft.Rtc.Collaboration.AudioVideo.HoldType holdType, System.Collections.Generic.IEnumerable<Microsoft.Rtc.Signaling.SignalingHeader> headers, AsyncCallback userCallback, object state);
member this.BeginHold : Microsoft.Rtc.Collaboration.AudioVideo.HoldType * seq<Microsoft.Rtc.Signaling.SignalingHeader> * AsyncCallback * obj -> IAsyncResult

Parameters

holdType
HoldType

The type of hold to be used.

headers
IEnumerable<SignalingHeader>

The signaling headers.

userCallback
AsyncCallback

The method to be called when the asynchronous operation is completed.

state
Object

A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.

Returns

An IAsyncResult that references the asynchronous operation.

Exceptions

Thrown when the AudioVideoFlow is not in the Active state or when there is already an asynchronous operation in progress.

Thrown when holdType argument value is None or is not a value in the HoldType enumerated type.

Applies to