Click or drag to resize

Cauldron.Interception Namespace

 
Classes
  ClassDescription
Public classCode exampleAssignMethodAttribute
Indicates the weaver to find the matching method and assign it to the Action or FuncTResult
This attribute can only be applied to public non-static fields of type Action and FuncTResult; with or without arguments.
If the field's type is an Action, the weaver will search for a void method without arguments.
If the field's type is an ActionT, the weaver will search for a void method with 1 argument.
If the field's type in a FuncTResult, the weaver will search for a method with a return type that matches TResult and no argmuents.
If the field's type in a FuncT, TResult, the weaver will search for a method with a return type that matches TResult and 1 argmuent.

This interceptor extension is available for IPropertyGetterInterceptor, IPropertySetterInterceptor, IPropertyInterceptor, IMethodInterceptor, ISimpleMethodInterceptor and IConstructorInterceptor.

Since properties are only methods, the AssignMethodAttribute can also search for the property's getter and setter. The getter requires a 'get_' prefix and the setter a 'set_' prefix e.g. if the property is named 'DispatchDate' then the setter search pattern will be 'set_DispatchDate' and the setter's search pattern will be 'get_DispatchDate'.

Public classExtensionsInterception
Provides usefull extension methods
Public classCode exampleInterceptionRuleAttribute
Adds weaving rules to the interceptor.
These rules only decides whether an interceptor is weaved or not.
An interceptor can have multiple rules.
Public classInterceptorOptionsAttribute
Adds additional options to the interceptor.
Public classPropertyInterceptionInfo
Contains information about the intercepted property
Interfaces
  InterfaceDescription
Public interfaceCode exampleIConstructorInterceptor
Represents a contructor interceptor.

Please note that ISyncRoot is NOT supported by this interceptor.

Public interfaceCode exampleIMethodInterceptor
Represents a method interceptor. This interceptor can also be applied to abstract methods and all overriding methods will implement this interceptor.
Public interfaceIMethodInterceptorOnExit
This extension adds an additional OnExit(Type, Object) method, which allows the interceptor to read and modify the return value of the method. Adding this interface to the IMethodInterceptor will render the OnExit useless.

This interceptor extension is only available for the IMethodInterceptor.

Public interfaceIPropertyGetterInterceptor
Represents an interceptor that can intercept a property's getter method. This interceptor can also be applied to abstract properties and all overriding methods will implement this interceptor.
Public interfaceIPropertyInterceptor
Represents an interceptor that can intercept a property's getter and setter method. This interceptor can also be applied to abstract properties and all overriding methods will implement this interceptor.
Public interfaceIPropertyInterceptorInitialize
Moves the property interceptor's initialization from 'first use' to the constructor of the declaring type.

This interceptor extension is available for IPropertyGetterInterceptor, IPropertySetterInterceptor and IPropertyInterceptor.

Public interfaceIPropertySetterInterceptor
Represents an interceptor that can intercept a property's setter method. This interceptor can also be applied to abstract properties and all overriding methods will implement this interceptor.
Public interfaceCode exampleISimpleMethodInterceptor
Represents a simple method interceptor
Public interfaceISyncRoot
Adds a sync-root to the interceptor. The sync-root object is the same for all interceptors applied to the property, field or method.

This interceptor extension is available for IPropertyGetterInterceptor, IPropertySetterInterceptor, IPropertyInterceptor, IMethodInterceptor and ISimpleMethodInterceptor.

Enumerations
  EnumerationDescription
Public enumerationInterceptionRuleOptions
Defines the interceptor weaving rules
Public enumerationMode
Defines weaving modes for the rule.