JobRouterModelFactory.ExceptionRule 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.
Initializes a new instance of ExceptionRule.
public static Azure.Communication.JobRouter.ExceptionRule ExceptionRule (string id = default, Azure.Communication.JobRouter.ExceptionTrigger trigger = default, System.Collections.Generic.IEnumerable<Azure.Communication.JobRouter.ExceptionAction> actions = default);
static member ExceptionRule : string * Azure.Communication.JobRouter.ExceptionTrigger * seq<Azure.Communication.JobRouter.ExceptionAction> -> Azure.Communication.JobRouter.ExceptionRule
Public Shared Function ExceptionRule (Optional id As String = Nothing, Optional trigger As ExceptionTrigger = Nothing, Optional actions As IEnumerable(Of ExceptionAction) = Nothing) As ExceptionRule
Parameters
- id
- String
Id of an exception rule.
- trigger
- ExceptionTrigger
The trigger for this exception rule. Please note ExceptionTrigger is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include QueueLengthExceptionTrigger and WaitTimeExceptionTrigger.
- actions
- IEnumerable<ExceptionAction>
A collection of actions to perform once the exception is triggered. Please note ExceptionAction is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include CancelExceptionAction, ManualReclassifyExceptionAction and ReclassifyExceptionAction.
Returns
A new ExceptionRule instance for mocking.
Applies to
Azure SDK for .NET