WorkflowQueuingService.GetWorkflowQueue(IComparable) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 WorkflowQueue를 검색합니다.
public:
System::Workflow::Runtime::WorkflowQueue ^ GetWorkflowQueue(IComparable ^ queueName);
public System.Workflow.Runtime.WorkflowQueue GetWorkflowQueue (IComparable queueName);
member this.GetWorkflowQueue : IComparable -> System.Workflow.Runtime.WorkflowQueue
Public Function GetWorkflowQueue (queueName As IComparable) As WorkflowQueue
매개 변수
- queueName
- IComparable
검색할 WorkflowQueue의 이름입니다.
반환
WorkflowQueue 개체입니다.
예외
queueName
이 null 참조(Visual Basic의 경우 Nothing
)인 경우
지정된 WorkflowQueue를 찾을 수 없는 경우
예제
다음 코드 예제에서는 CreateQueue
메서드를 호출하여 WorkflowQueuingService 개체를 초기화하는 ActivityExecutionContext.GetService라는 메서드를 보여 줍니다. 그런 다음 Exists 메서드를 사용하여 지정된 이름의 WorkflowQueue가 있는지 확인합니다. 없는 경우 코드에서 CreateWorkflowQueue 메서드를 호출하고, 있는 경우 코드에서 GetWorkflowQueue 메서드를 호출합니다.
이 코드 예제는 FileSystemEvent.cs 파일에 있는 File Watcher Activity SDK 샘플의 일부입니다. 자세한 내용은 파일 시스템 감시자 작업합니다.
private WorkflowQueue CreateQueue(ActivityExecutionContext context)
{
Console.WriteLine("CreateQueue");
WorkflowQueuingService qService = context.GetService<WorkflowQueuingService>();
if (!qService.Exists(this.QueueName))
{
qService.CreateWorkflowQueue(this.QueueName, true);
}
return qService.GetWorkflowQueue(this.QueueName);
}
Private Function CreateQueue(ByVal context As ActivityExecutionContext) As WorkflowQueue
Console.WriteLine("CreateQueue")
Dim qService As WorkflowQueuingService = context.GetService(Of WorkflowQueuingService)()
If Not qService.Exists(Me.queueName) Then
qService.CreateWorkflowQueue(Me.queueName, True)
End If
Return qService.GetWorkflowQueue(Me.QueueName)
End Function
적용 대상
추가 정보
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기