CallAutomationEventProcessor.WaitForEventProcessorAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WaitForEventProcessorAsync(Func<CallAutomationEventBase,Boolean>, CancellationToken) |
Wait for matching incoming event. Returns the CallAutomationEventBase once it arrives in ProcessEvent method. |
WaitForEventProcessorAsync<TEvent>(String, String, CancellationToken) |
Wait for matching incoming event. Returns the CallAutomationEventBase once it arrives in ProcessEvent method. |
WaitForEventProcessorAsync(Func<CallAutomationEventBase,Boolean>, CancellationToken)
Wait for matching incoming event. Returns the CallAutomationEventBase once it arrives in ProcessEvent method.
public System.Threading.Tasks.Task<Azure.Communication.CallAutomation.CallAutomationEventBase> WaitForEventProcessorAsync (Func<Azure.Communication.CallAutomation.CallAutomationEventBase,bool> predicate, System.Threading.CancellationToken cancellationToken = default);
member this.WaitForEventProcessorAsync : Func<Azure.Communication.CallAutomation.CallAutomationEventBase, bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Communication.CallAutomation.CallAutomationEventBase>
Public Function WaitForEventProcessorAsync (predicate As Func(Of CallAutomationEventBase, Boolean), Optional cancellationToken As CancellationToken = Nothing) As Task(Of CallAutomationEventBase)
Parameters
- predicate
- Func<CallAutomationEventBase,Boolean>
Predicate for waiting on event.
- cancellationToken
- CancellationToken
Cancellation Token can be used to set timeout or cancel this WaitForEventProcessor.
Returns
Returns CallAutomationEventBase once matching event arrives.
Applies to
WaitForEventProcessorAsync<TEvent>(String, String, CancellationToken)
Wait for matching incoming event. Returns the CallAutomationEventBase once it arrives in ProcessEvent method.
public System.Threading.Tasks.Task<TEvent> WaitForEventProcessorAsync<TEvent> (string connectionId = default, string operationContext = default, System.Threading.CancellationToken cancellationToken = default) where TEvent : Azure.Communication.CallAutomation.CallAutomationEventBase;
member this.WaitForEventProcessorAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Event (requires 'Event :> Azure.Communication.CallAutomation.CallAutomationEventBase)> (requires 'Event :> Azure.Communication.CallAutomation.CallAutomationEventBase)
Public Function WaitForEventProcessorAsync(Of TEvent As CallAutomationEventBase) (Optional connectionId As String = Nothing, Optional operationContext As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TEvent)
Type Parameters
- TEvent
Matching event type.
Parameters
- connectionId
- String
CallConnectionId of the call.
- operationContext
- String
OperationContext of the method.
- cancellationToken
- CancellationToken
Cancellation Token can be used to set timeout or cancel this WaitForEventProcessor.
Returns
Returns the event once matching event arrives.
Applies to
Azure SDK for .NET