C# Class Pathoschild.DesignByContract.DesignedByContractAttribute

Inheritance: OnMethodBoundaryAspect
Mostrar archivo Open project: Pathoschild/DesignByContract

Private Properties

Property Type Description

Public Methods

Method 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.).

Protected Methods

Method Description
DesignedByContractAttribute ( IMethodAnalyzer analyzer, bool inheritContract = true ) : System

Construct an instance.

Method Details

CompileTimeInitialize() public method

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.
return void

CompileTimeValidate() public method

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
return bool

DesignedByContractAttribute() public method

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
return System

DesignedByContractAttribute() protected method

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.
return System

OnEntry() public final method

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 .
return void

OnSuccess() public final method

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.
return void