C# Класс Pathoschild.DesignByContract.DesignedByContractAttribute

Наследование: OnMethodBoundaryAspect
Показать файл Открыть проект

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
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.).

Защищенные методы

Метод Описание
DesignedByContractAttribute ( IMethodAnalyzer analyzer, bool inheritContract = true ) : System

Construct an instance.

Описание методов

CompileTimeInitialize() публичный Метод

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.
Результат void

CompileTimeValidate() публичный Метод

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
Результат bool

DesignedByContractAttribute() публичный Метод

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
Результат System

DesignedByContractAttribute() защищенный Метод

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.
Результат System

OnEntry() публичный закрытый Метод

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 .
Результат void

OnSuccess() публичный закрытый Метод

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.
Результат void