RetryBaseAttribute Classe

Definição

Um atributo abstrato que controla a repetição de um método de teste se ele falhou. Cabe às classes derivadas definir como a repetição é feita.

[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
Herança
RetryBaseAttribute
Derivado
Atributos

Comentários

Quando aplicado a uma classe de teste, o atributo é usado como padrão para cada método de teste declarado na classe. Um atributo de repetição colocado diretamente em um método de teste tem precedência sobre um nível de classe. O atributo não é herdado: a aplicação a uma classe de teste base não o aplica a classes de teste derivadas.

Construtores

Nome Description
RetryBaseAttribute()

Um atributo abstrato que controla a repetição de um método de teste se ele falhou. Cabe às classes derivadas definir como a repetição é feita.

Métodos

Nome Description
ExecuteAsync(RetryContext)

Tenta novamente o método de teste. Os detalhes de como a repetição é feita são deixados para as classes derivadas. Observe que uma primeira execução do método já foi executada e falhou antes de esse método ser chamado.

Aplica-se a