C# Class Pathoschild.DesignByContract.DesignedByContractAttribute

Inheritance: OnMethodBoundaryAspect
Afficher le fichier Open project: Pathoschild/DesignByContract

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
CompileTimeInitialize ( MethodBase method, AspectInfo aspectInfo ) : void

Method invoked at build time to initialize the instance fields of the current aspect. This method is invoked before any other build-time method.

This implementation analyzes the annotated method and prepares the conditions for runtime verification.

CompileTimeValidate ( MethodBase method ) : bool

Method invoked at build time to determine whether code needs to be injected for this method.

DesignedByContractAttribute ( ) : System

Construct an annotation which indicates that invocations of the target methods should be validated to ensure that their preconditions or postconditions are respected.

OnEntry ( MethodExecutionArgs args ) : void

Method executed before the body of methods to which this aspect is applied.

OnSuccess ( MethodExecutionArgs args ) : void

Method executed after the body of methods to which this aspect is applied, but only when the method successfully returns (i.e. when no exception flies out the method.).

Méthodes protégées

Méthode Description
DesignedByContractAttribute ( IMethodAnalyzer analyzer, bool inheritContract = true ) : System

Construct an instance.

Method Details

CompileTimeInitialize() public méthode

Method invoked at build time to initialize the instance fields of the current aspect. This method is invoked before any other build-time method.
This implementation analyzes the annotated method and prepares the conditions for runtime verification.
public CompileTimeInitialize ( MethodBase method, AspectInfo aspectInfo ) : void
method System.Reflection.MethodBase Method to which the current aspect is applied
aspectInfo AspectInfo Reserved for future usage.
Résultat void

CompileTimeValidate() public méthode

Method invoked at build time to determine whether code needs to be injected for this method.
public CompileTimeValidate ( MethodBase method ) : bool
method System.Reflection.MethodBase Method to which the current aspect is applied
Résultat bool

DesignedByContractAttribute() public méthode

Construct an annotation which indicates that invocations of the target methods should be validated to ensure that their preconditions or postconditions are respected.
public DesignedByContractAttribute ( ) : System
Résultat System

DesignedByContractAttribute() protected méthode

Construct an instance.
protected DesignedByContractAttribute ( IMethodAnalyzer analyzer, bool inheritContract = true ) : System
analyzer IMethodAnalyzer Reflects methods and properties for contract analysis.
inheritContract bool Whether to inherit the contract annotations defined on a base class or interface.
Résultat System

OnEntry() public final méthode

Method executed before the body of methods to which this aspect is applied.
public final OnEntry ( MethodExecutionArgs args ) : void
args MethodExecutionArgs Event arguments specifying which method is being executed, which are its arguments, and how should the execution continue after the execution of .
Résultat void

OnSuccess() public final méthode

Method executed after the body of methods to which this aspect is applied, but only when the method successfully returns (i.e. when no exception flies out the method.).
public final OnSuccess ( MethodExecutionArgs args ) : void
args MethodExecutionArgs Event arguments specifying which method is being executed and which are its arguments.
Résultat void