IDialog<TResult> 인터페이스
정의
는 IDialog<TResult> 형식의 결과를 생성 하는 일시 대화형 프로세스입니다 TResult
.A IDialog<TResult> is a suspendable conversational process that produces a result of type TResult
.
public interface IDialog<out TResult>
type IDialog<'Result> = interface
Public Interface IDialog(Of Out TResult)
형식 매개 변수
- TResult
결과 유형입니다.The result type.
이 형식 매개 변수는 공변(Covariant)입니다. 즉, 지정한 형식이나 더 많게 파생된 모든 형식을 사용할 수 있습니다. 공변성(Covariance) 및 반공변성(Contravariance)에 대한 자세한 내용은 제네릭의 공변성(Covariance) 및 반공변성(Contravariance)을 참조하세요.- 파생
설명
대화 상자는 자식 대화 상자를 호출 하거나 사용자에 게 메시지를 보낼 수 있습니다.Dialogs can call child dialogs or send messages to a user. 사용자의 메시지를 bot 대기할 때 대화 상자가 일시 중단 됩니다.Dialogs are suspended when waiting for a message from the user to the bot. 사용자 로부터 메시지가 수신 되 면 대화 상자가 다시 시작 됩니다.Dialogs are resumed when the bot receives a message from the user.
메서드
StartAsync(IDialogContext) |
대화 상자를 나타내는 코드의 시작 부분입니다.The start of the code that represents the conversational dialog. |
확장 메서드
Catch<T>(IDialog<T>, Func<IDialog<T>,Exception,IDialog<T>>) |
선행 IDialog<TResult> 작업이 완료 되 면 예외를 catch 하 고 처리 합니다.When the antecedent IDialog<TResult> has completed, catch and handle any exceptions. |
Catch<T,E>(IDialog<T>, Func<IDialog<T>,E,IDialog<T>>) |
선행 IDialog<TResult> 작업이 완료 되 면 형식의 예외를 catch 하 고 처리 |
ContinueWith<T,R>(IDialog<T>, Chain.Continuation) |
선행 작업이 완료 되 면 연속 작업을 IDialog<TResult> 실행 하 여 다음을 생성 IDialog<TResult> 합니다.When the antecedent IDialog<TResult> has completed, execute the continuation to produce the next IDialog<TResult>. |
DefaultIfException<T>(IDialog<T>) |
선행 IDialog<TResult> 작업이 완료 되 면 예외의 전파를 중지 합니다.When the antecedent IDialog<TResult> has completed, stop the propagation of Exception. |
DefaultIfException<T,E>(IDialog<T>) |
선행 IDialog<TResult> 작업이 완료 되 면 예외의 전파를 중지 |
Do<T>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task>) |
이 완료 된 후 파생 효과를 실행 IDialog<TResult> 합니다.Execute a side-effect after a IDialog<TResult> completes. |
Loop<T>(IDialog<T>) |
영원히 반복 IDialog<TResult> 합니다.Loop the IDialog<TResult> forever. |
PostEvent<T,E>(IDialog<T>, E) |
선행 IDialog<TResult> 작업이 완료 되 면 이벤트 큐에 항목을 게시 합니다.When the antecedent IDialog<TResult> has completed, post the item to the event queue. |
PostToUser<T>(IDialog<T>) |
의 결과를 사용자에 게 게시 IDialog<TResult> 합니다.Post to the user the result of a IDialog<TResult>. |
Select<T,R>(IDialog<T>, Func<T,R>) |
선행 IDialog<TResult> 작업이 완료 되 면 결과를 새로 프로젝션 합니다 IDialog<TResult> .When the antecedent IDialog<TResult> has completed, project the result into a new IDialog<TResult>. |
SelectMany<T,C,R>(IDialog<T>, Func<T,IDialog<C>>, Func<T,C,R>) |
선행 IDialog<TResult> 작업이 완료 되 면 다음을 실행 하 IDialog<TResult> 고 프로젝션을 사용 하 여 결과를 결합 합니다.When the antecedent IDialog<TResult> has completed, execute the next IDialog<TResult>, and use the projection to combine the results. |
Switch<T,R>(IDialog<T>, ICase<T,R>[]) |
선행 IDialog<TResult> 작업이 완료 되 면 각 작업을 진행 하 여 ICase<T,R> ContextualSelector<T,R> ICase<T,R> 선행 대화 상자에서 반환 된 값이 충족 하는 첫 번째의 "를 실행 합니다.When the antecedent IDialog<TResult> has completed, go through each ICase<T,R> and run the ContextualSelector<T,R>" of the first ICase<T,R> that the returned value by the antecedent dialog satisfies. |
Then<T,R>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task<R>>) |
가 완료 된 후 작업을 실행 IDialog<TResult> 합니다.Execute an action after the IDialog<TResult> completes. |
Void<T>(IDialog<T>, IDialogStack) |
무효화를 호출 IDialog<TResult> 하 고 결과를 무시 한 다음 원래 대화 상자 대기를 다시 시작 합니다.Call the voided IDialog<TResult>, ignore the result, then restart the original dialog wait. |
Void<T,R>(IDialog<T>) |
무효화를 호출 IDialog<TResult> 하 고 결과를 무시 한 다음 원래 대화 상자 대기를 다시 시작 합니다.Call the voided IDialog<TResult>, ignore the result, then restart the original dialog wait. |
WaitToBot<T>(IDialog<T>) |
선행 작업이 완료 된 후 봇에 메시지를 체인에 게시 합니다.Post to the chain the message to the bot after the antecedent completes. |
Where<T>(IDialog<T>, Func<T,Boolean>) |
선행 IDialog<TResult> 작업이 완료 되 면 조건자를 평가 하 고 계속할지 여부를 결정 합니다.When the antecedent IDialog<TResult> has completed, evaluate the predicate and decide whether to continue. |
While<T>(IDialog<T>, Func<T,IDialog<Boolean>>, Func<T,IDialog<T>>) |
IDialog<TResult>While 루프를 나타내는을 만듭니다.Create a IDialog<TResult> that represents a while loop. |
WithScorable<T,Item,Score>(IDialog<T>, IScorable<Item,Score>) |
Scorable를 사용 하 여 대화 상자를 장식 하 여 scorable가 대화 스택에 참여할 수 있도록 합니다.Decorate a dialog with a scorable, so that a scorable can participate on the dialog stack. |