次の方法で共有


JobRouterModelFactory.ConditionalWorkerSelectorAttachment Method

Definition

Initializes a new instance of ConditionalWorkerSelectorAttachment.

public static Azure.Communication.JobRouter.ConditionalWorkerSelectorAttachment ConditionalWorkerSelectorAttachment (Azure.Communication.JobRouter.RouterRule condition = default, System.Collections.Generic.IEnumerable<Azure.Communication.JobRouter.RouterWorkerSelector> workerSelectors = default);
static member ConditionalWorkerSelectorAttachment : Azure.Communication.JobRouter.RouterRule * seq<Azure.Communication.JobRouter.RouterWorkerSelector> -> Azure.Communication.JobRouter.ConditionalWorkerSelectorAttachment
Public Shared Function ConditionalWorkerSelectorAttachment (Optional condition As RouterRule = Nothing, Optional workerSelectors As IEnumerable(Of RouterWorkerSelector) = Nothing) As ConditionalWorkerSelectorAttachment

Parameters

condition
RouterRule

The condition that must be true for the worker selectors to be attached. Please note RouterRule 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 DirectMapRouterRule, ExpressionRouterRule, FunctionRouterRule, StaticRouterRule and WebhookRouterRule.

workerSelectors
IEnumerable<RouterWorkerSelector>

The worker selectors to attach.

Returns

A new ConditionalWorkerSelectorAttachment instance for mocking.

Applies to