C# Class CacheAspect.Repository.CacheAttribute

Inheritance: MethodInterceptionAspect
Mostra file Open project: BernieCook/CacheAspect

Public Properties

Property Type Description
Action CacheAction

Public Methods

Method Description
CacheAttribute ( CacheAction action ) : System

Constructor.

CompileTimeInitialize ( MethodBase methodBase, AspectInfo aspectInfo ) : void

Initialisation during compile time.

Normally you'd determine the class name at this point but because we're using generic repositories it's of no use.

OnInvoke ( MethodInterceptionArgs methodInterceptionArgs ) : void

Invoke on method call.

RuntimeInitialize ( MethodBase methodBase ) : void

Runtime initialisation.

Private Methods

Method Description
BuildCacheKey ( MethodInterceptionArgs methodInterceptionArgs ) : string

Build the cache key using the type name, method name and parameter argument values.

CacheAttribute ( ) : System

Static constructor.

GetTypeName ( Type type ) : string

Use reflection to get the object's type name.

If we're supporting non-generic repositories we need to identify the correct type name.

Method Details

CacheAttribute() public method

Constructor.
public CacheAttribute ( CacheAction action ) : System
action CacheAction Cache action.
return System

CompileTimeInitialize() public method

Initialisation during compile time.
Normally you'd determine the class name at this point but because we're using generic repositories it's of no use.
public CompileTimeInitialize ( MethodBase methodBase, AspectInfo aspectInfo ) : void
methodBase System.Reflection.MethodBase Method information.
aspectInfo AspectInfo Aspect information.
return void

OnInvoke() public method

Invoke on method call.
public OnInvoke ( MethodInterceptionArgs methodInterceptionArgs ) : void
methodInterceptionArgs MethodInterceptionArgs
return void

RuntimeInitialize() public method

Runtime initialisation.
public RuntimeInitialize ( MethodBase methodBase ) : void
methodBase System.Reflection.MethodBase Method information.
return void

Property Details

Action public_oe property

public CacheAction Action
return CacheAction