C# 클래스 Castle.DynamicProxy.Builder.CodeGenerators.BaseCodeGenerator

파일 보기 프로젝트 열기: nats/castle-1.0.3-mono

보호된 프로퍼티들

프로퍼티 타입 설명
_baseType System.Type
_cachedFields System.Collections.ArrayList
_interface2mixinIndex System.Collections.Specialized.HybridDictionary
_method2Delegate System.Collections.Hashtable
_method2Invocation Castle.DynamicProxy.Builder.CodeBuilder.EasyMethod
_mixins object[]

공개 메소드들

메소드 설명
NoFilterImpl ( Type type, object criteria ) : bool

보호된 메소드들

메소드 설명
AddISerializable ( Type interfaces ) : System.Type[]
AddInterfaces ( Type interfacesToAdd, Type interfaces ) : System.Type[]
BaseCodeGenerator ( ModuleScope moduleScope ) : System
BaseCodeGenerator ( ModuleScope moduleScope, GeneratorContext context ) : System
CreateProperty ( PropertyInfo property ) : EasyProperty

Generate property implementation

CreateType ( ) : Type
CreateTypeBuilder ( String typeName, Type baseType, Type interfaces ) : EasyType
CustomizeGetObjectData ( Castle.DynamicProxy.Builder.CodeBuilder.AbstractCodeBuilder codebuilder, ArgumentReference arg1, ArgumentReference arg2 ) : void
Filter ( Type mixinInterfaces ) : System.Type[]
GenerateCallbackMethodIfNecessary ( MethodInfo method, Reference invocationTarget ) : MethodInfo
GenerateConstructor ( ) : EasyConstructor

Generates one public constructor receiving the IInterceptor instance and instantiating a hashtable

Should be overrided to provided specific semantics, if necessary

GenerateConstructorCode ( ConstructorCodeBuilder codebuilder, Reference interceptorArg, Reference targetArgument, Reference mixinArray ) : void

Common initializatio code for the default constructor

GenerateFields ( ) : void
GenerateInterfaceImplementation ( Type interfaces ) : void

GenerateMethodImplementation ( MethodInfo method, EasyProperty properties ) : void

Generates implementation for each method.

GenerateMethods ( Type inter, EasyProperty properties ) : void
GenerateProperties ( Type inter ) : Castle.DynamicProxy.Builder.CodeBuilder.EasyProperty[]
GenerateTypeImplementation ( Type type, bool ignoreInterfaces ) : void

Iterates over the interfaces and generate implementation for each method in it.

GenerateTypeName ( Type type, Type interfaces ) : String
GetCorrectMethod ( MethodInfo method ) : MethodInfo
GetFromCache ( Type baseClass, Type interfaces ) : Type
GetPseudoInvocationTarget ( MethodInfo method ) : Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.Expression
GetTypeName ( Type type ) : String

Gets the name of a type, taking into consideration nested types.

ImplementCacheInvocationCache ( ) : void
ImplementGetObjectData ( Type interfaces ) : void
InspectAndRegisterInterfaces ( object mixins ) : System.Type[]
IsInternalToDynamicProxy ( Assembly asm ) : bool
NormalizeNamespaceName ( String nsName ) : String

Naive implementation, but valid for long namespaces Works by using only the last piece of the namespace

ObtainAvailableConstructor ( Type target ) : ConstructorInfo
ObtainCallableFieldBuilderDelegate ( EasyCallable builder ) : FieldReference
PostProcessMethod ( MethodInfo method ) : void
PreProcessMethod ( MethodInfo method ) : void
RegisterDelegateFieldToBeInitialized ( MethodInfo method, FieldReference field, EasyCallable builder, MethodInfo callbackMethod ) : void
RegisterInCache ( Type generatedType ) : void
WriteInterceptorInvocationMethod ( MethodInfo method, Castle.DynamicProxy.Builder.CodeBuilder.EasyMethod builder ) : void

Writes the method implementation. This method generates the IL code for property get/set method and ordinary methods.

비공개 메소드들

메소드 설명
ObtainMethodAttributes ( MethodInfo method ) : MethodAttributes

메소드 상세

AddISerializable() 보호된 메소드

protected AddISerializable ( Type interfaces ) : System.Type[]
interfaces System.Type
리턴 System.Type[]

AddInterfaces() 보호된 메소드

protected AddInterfaces ( Type interfacesToAdd, Type interfaces ) : System.Type[]
interfacesToAdd System.Type
interfaces System.Type
리턴 System.Type[]

BaseCodeGenerator() 보호된 메소드

protected BaseCodeGenerator ( ModuleScope moduleScope ) : System
moduleScope ModuleScope
리턴 System

BaseCodeGenerator() 보호된 메소드

protected BaseCodeGenerator ( ModuleScope moduleScope, GeneratorContext context ) : System
moduleScope ModuleScope
context GeneratorContext
리턴 System

CreateProperty() 보호된 메소드

Generate property implementation
protected CreateProperty ( PropertyInfo property ) : EasyProperty
property System.Reflection.PropertyInfo
리턴 Castle.DynamicProxy.Builder.CodeBuilder.EasyProperty

CreateType() 보호된 메소드

protected CreateType ( ) : Type
리턴 System.Type

CreateTypeBuilder() 보호된 메소드

protected CreateTypeBuilder ( String typeName, Type baseType, Type interfaces ) : EasyType
typeName String
baseType System.Type
interfaces System.Type
리턴 Castle.DynamicProxy.Builder.CodeBuilder.EasyType

CustomizeGetObjectData() 보호된 메소드

protected CustomizeGetObjectData ( Castle.DynamicProxy.Builder.CodeBuilder.AbstractCodeBuilder codebuilder, ArgumentReference arg1, ArgumentReference arg2 ) : void
codebuilder Castle.DynamicProxy.Builder.CodeBuilder.AbstractCodeBuilder
arg1 Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.ArgumentReference
arg2 Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.ArgumentReference
리턴 void

Filter() 보호된 메소드

protected Filter ( Type mixinInterfaces ) : System.Type[]
mixinInterfaces System.Type
리턴 System.Type[]

GenerateCallbackMethodIfNecessary() 보호된 메소드

protected GenerateCallbackMethodIfNecessary ( MethodInfo method, Reference invocationTarget ) : MethodInfo
method System.Reflection.MethodInfo
invocationTarget Reference
리턴 System.Reflection.MethodInfo

GenerateConstructor() 보호된 메소드

Generates one public constructor receiving the IInterceptor instance and instantiating a hashtable
Should be overrided to provided specific semantics, if necessary
protected GenerateConstructor ( ) : EasyConstructor
리턴 Castle.DynamicProxy.Builder.CodeBuilder.EasyConstructor

GenerateConstructorCode() 보호된 메소드

Common initializatio code for the default constructor
protected GenerateConstructorCode ( ConstructorCodeBuilder codebuilder, Reference interceptorArg, Reference targetArgument, Reference mixinArray ) : void
codebuilder Castle.DynamicProxy.Builder.CodeBuilder.ConstructorCodeBuilder
interceptorArg Reference
targetArgument Reference
mixinArray Reference
리턴 void

GenerateFields() 보호된 메소드

protected GenerateFields ( ) : void
리턴 void

GenerateInterfaceImplementation() 보호된 메소드

protected GenerateInterfaceImplementation ( Type interfaces ) : void
interfaces System.Type
리턴 void

GenerateMethodImplementation() 보호된 메소드

Generates implementation for each method.
protected GenerateMethodImplementation ( MethodInfo method, EasyProperty properties ) : void
method System.Reflection.MethodInfo
properties Castle.DynamicProxy.Builder.CodeBuilder.EasyProperty
리턴 void

GenerateMethods() 보호된 메소드

protected GenerateMethods ( Type inter, EasyProperty properties ) : void
inter System.Type
properties Castle.DynamicProxy.Builder.CodeBuilder.EasyProperty
리턴 void

GenerateProperties() 보호된 메소드

protected GenerateProperties ( Type inter ) : Castle.DynamicProxy.Builder.CodeBuilder.EasyProperty[]
inter System.Type
리턴 Castle.DynamicProxy.Builder.CodeBuilder.EasyProperty[]

GenerateTypeImplementation() 보호된 메소드

Iterates over the interfaces and generate implementation for each method in it.
protected GenerateTypeImplementation ( Type type, bool ignoreInterfaces ) : void
type System.Type Type class
ignoreInterfaces bool if true, we inspect the /// type for implemented interfaces
리턴 void

GenerateTypeName() 보호된 추상적인 메소드

protected abstract GenerateTypeName ( Type type, Type interfaces ) : String
type System.Type
interfaces System.Type
리턴 String

GetCorrectMethod() 보호된 메소드

protected GetCorrectMethod ( MethodInfo method ) : MethodInfo
method System.Reflection.MethodInfo
리턴 System.Reflection.MethodInfo

GetFromCache() 보호된 메소드

protected GetFromCache ( Type baseClass, Type interfaces ) : Type
baseClass System.Type
interfaces System.Type
리턴 System.Type

GetPseudoInvocationTarget() 보호된 메소드

protected GetPseudoInvocationTarget ( MethodInfo method ) : Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.Expression
method System.Reflection.MethodInfo
리턴 Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.Expression

GetTypeName() 보호된 메소드

Gets the name of a type, taking into consideration nested types.
protected GetTypeName ( Type type ) : String
type System.Type
리턴 String

ImplementCacheInvocationCache() 보호된 메소드

protected ImplementCacheInvocationCache ( ) : void
리턴 void

ImplementGetObjectData() 보호된 메소드

protected ImplementGetObjectData ( Type interfaces ) : void
interfaces System.Type
리턴 void

InspectAndRegisterInterfaces() 보호된 메소드

protected InspectAndRegisterInterfaces ( object mixins ) : System.Type[]
mixins object
리턴 System.Type[]

IsInternalToDynamicProxy() 보호된 메소드

protected IsInternalToDynamicProxy ( Assembly asm ) : bool
asm System.Reflection.Assembly
리턴 bool

NoFilterImpl() 공개 정적인 메소드

public static NoFilterImpl ( Type type, object criteria ) : bool
type System.Type
criteria object
리턴 bool

NormalizeNamespaceName() 보호된 메소드

Naive implementation, but valid for long namespaces Works by using only the last piece of the namespace
protected NormalizeNamespaceName ( String nsName ) : String
nsName String
리턴 String

ObtainAvailableConstructor() 보호된 메소드

protected ObtainAvailableConstructor ( Type target ) : ConstructorInfo
target System.Type
리턴 System.Reflection.ConstructorInfo

ObtainCallableFieldBuilderDelegate() 보호된 메소드

protected ObtainCallableFieldBuilderDelegate ( EasyCallable builder ) : FieldReference
builder Castle.DynamicProxy.Builder.CodeBuilder.EasyCallable
리턴 Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.FieldReference

PostProcessMethod() 보호된 메소드

protected PostProcessMethod ( MethodInfo method ) : void
method System.Reflection.MethodInfo
리턴 void

PreProcessMethod() 보호된 메소드

protected PreProcessMethod ( MethodInfo method ) : void
method System.Reflection.MethodInfo
리턴 void

RegisterDelegateFieldToBeInitialized() 보호된 메소드

protected RegisterDelegateFieldToBeInitialized ( MethodInfo method, FieldReference field, EasyCallable builder, MethodInfo callbackMethod ) : void
method System.Reflection.MethodInfo
field Castle.DynamicProxy.Builder.CodeBuilder.SimpleAST.FieldReference
builder Castle.DynamicProxy.Builder.CodeBuilder.EasyCallable
callbackMethod System.Reflection.MethodInfo
리턴 void

RegisterInCache() 보호된 메소드

protected RegisterInCache ( Type generatedType ) : void
generatedType System.Type
리턴 void

WriteInterceptorInvocationMethod() 보호된 메소드

Writes the method implementation. This method generates the IL code for property get/set method and ordinary methods.
protected WriteInterceptorInvocationMethod ( MethodInfo method, Castle.DynamicProxy.Builder.CodeBuilder.EasyMethod builder ) : void
method System.Reflection.MethodInfo The method to implement.
builder Castle.DynamicProxy.Builder.CodeBuilder.EasyMethod being constructed.
리턴 void

프로퍼티 상세

_baseType 보호되어 있는 프로퍼티

protected Type,System _baseType
리턴 System.Type

_cachedFields 보호되어 있는 프로퍼티

Holds instance fields which points to delegates instantiated
protected ArrayList,System.Collections _cachedFields
리턴 System.Collections.ArrayList

_interface2mixinIndex 보호되어 있는 프로퍼티

protected HybridDictionary,System.Collections.Specialized _interface2mixinIndex
리턴 System.Collections.Specialized.HybridDictionary

_method2Delegate 보호되어 있는 프로퍼티

MethodInfo => Callable delegate
protected Hashtable,System.Collections _method2Delegate
리턴 System.Collections.Hashtable

_method2Invocation 보호되어 있는 프로퍼티

protected EasyMethod,Castle.DynamicProxy.Builder.CodeBuilder _method2Invocation
리턴 Castle.DynamicProxy.Builder.CodeBuilder.EasyMethod

_mixins 보호되어 있는 프로퍼티

protected object[] _mixins
리턴 object[]