RetryBaseAttribute Classe

Definizione

Attributo astratto che controlla la ripetizione di un metodo di test se non è riuscito. Spetta alle classi derivate definire il modo in cui viene eseguito il nuovo tentativo.

[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public abstract class RetryBaseAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class RetryBaseAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public abstract class RetryBaseAttribute : Attribute
[System.Runtime.CompilerServices.Nullable(0)]
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public abstract class RetryBaseAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type RetryBaseAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type RetryBaseAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type RetryBaseAttribute = class
    inherit Attribute
[<System.Runtime.CompilerServices.Nullable(0)>]
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type RetryBaseAttribute = class
    inherit Attribute
Public MustInherit Class RetryBaseAttribute
Inherits Attribute
Ereditarietà
RetryBaseAttribute
Derivato
Attributi

Commenti

Se applicato a una classe di test, l'attributo viene usato come valore predefinito per ogni metodo di test dichiarato nella classe . Un attributo di ripetizione dei tentativi posizionato direttamente su un metodo di test ha la precedenza su un attributo di livello classe. L'attributo non viene ereditato: l'applicazione a una classe di test di base non viene applicata alle classi di test derivate.

Costruttori

Nome Descrizione
RetryBaseAttribute()

Attributo astratto che controlla la ripetizione di un metodo di test se non è riuscito. Spetta alle classi derivate definire il modo in cui viene eseguito il nuovo tentativo.

Metodi

Nome Descrizione
ExecuteAsync(RetryContext)

Ritenta il metodo di test. I dettagli sulla modalità di ripetizione dei tentativi vengono lasciati alle classi derivate. Si noti che una prima esecuzione del metodo è già stata eseguita e non è riuscita prima di chiamare questo metodo.

Si applica a