Dela via


Chain.Catch Metod

Definition

Överlagringar

Catch<T,E>(IDialog<T>, Func<IDialog<T>,E,IDialog<T>>)

När den föregående har slutförts IDialog<TResult> fångar och hanterar du eventuella undantag av typen E.

Catch<T>(IDialog<T>, Func<IDialog<T>,Exception,IDialog<T>>)

När den föregående har slutförts IDialog<TResult> fångar och hanterar du eventuella undantag.

Catch<T,E>(IDialog<T>, Func<IDialog<T>,E,IDialog<T>>)

Källa:
Chain.cs

När den föregående har slutförts IDialog<TResult> fångar och hanterar du eventuella undantag av typen E.

public static Microsoft.Bot.Builder.Dialogs.IDialog<T> Catch<T,E> (this Microsoft.Bot.Builder.Dialogs.IDialog<T> antecedent, Func<Microsoft.Bot.Builder.Dialogs.IDialog<T>,E,Microsoft.Bot.Builder.Dialogs.IDialog<T>> block) where E : Exception;
static member Catch : Microsoft.Bot.Builder.Dialogs.IDialog<'T> * Func<Microsoft.Bot.Builder.Dialogs.IDialog<'T>, 'E, Microsoft.Bot.Builder.Dialogs.IDialog<'T> (requires 'E :> Exception)> -> Microsoft.Bot.Builder.Dialogs.IDialog<'T> (requires 'E :> Exception)
<Extension()>
Public Function Catch(Of T, E) (antecedent As IDialog(Of T), block As Func(Of IDialog(Of T), E, IDialog(Of T))) As IDialog(Of T)

Typparametrar

T

Den typ som returneras av den föregående dialogrutan.

E

Typ av undantag för att fånga och hantera.

Parametrar

antecedent
IDialog<T>

Dialogrutan antecedent IDialog<TResult>.

block
Func<IDialog<T>,E,IDialog<T>>

Lambda-uttrycket som representerar catch block-hanteraren.

Returer

IDialog<T>

Resultatet av catch block-hanteraren om det finns ett undantag av typen E.

Gäller för

Catch<T>(IDialog<T>, Func<IDialog<T>,Exception,IDialog<T>>)

Källa:
Chain.cs

När den föregående har slutförts IDialog<TResult> fångar och hanterar du eventuella undantag.

public static Microsoft.Bot.Builder.Dialogs.IDialog<T> Catch<T> (this Microsoft.Bot.Builder.Dialogs.IDialog<T> antecedent, Func<Microsoft.Bot.Builder.Dialogs.IDialog<T>,Exception,Microsoft.Bot.Builder.Dialogs.IDialog<T>> block);
static member Catch : Microsoft.Bot.Builder.Dialogs.IDialog<'T> * Func<Microsoft.Bot.Builder.Dialogs.IDialog<'T>, Exception, Microsoft.Bot.Builder.Dialogs.IDialog<'T>> -> Microsoft.Bot.Builder.Dialogs.IDialog<'T>
<Extension()>
Public Function Catch(Of T) (antecedent As IDialog(Of T), block As Func(Of IDialog(Of T), Exception, IDialog(Of T))) As IDialog(Of T)

Typparametrar

T

Den typ som returneras av den föregående dialogrutan.

Parametrar

antecedent
IDialog<T>

Dialogrutan antecedent IDialog<TResult>.

block
Func<IDialog<T>,Exception,IDialog<T>>

Lambda-uttrycket som representerar catch block-hanteraren.

Returer

IDialog<T>

Resultatet av catch block-hanteraren om det finns ett undantag.

Gäller för