C# 클래스 Castle.DynamicProxy.ModuleScope

Summary description for ModuleScope.
파일 보기 프로젝트 열기: Jarvin-Guan/CleanAOP 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DEFAULT_ASSEMBLY_NAME String
DEFAULT_FILE_NAME String

공개 메소드들

메소드 설명
DefineType ( bool inSignedModulePreferably, string name, TypeAttributes flags ) : TypeBuilder
GetFromCache ( Castle.DynamicProxy.Generators.CacheKey key ) : Type

Returns a type from this scope's type cache, or null if the key cannot be found.

GetKeyPair ( ) : byte[]

Gets the key pair used to sign the strong-named assembly generated by this ModuleScope.

LoadAssemblyIntoCache ( Assembly assembly ) : void

Loads the generated types from the given assembly into this ModuleScope's cache.

This method can be used to load previously generated and persisted proxy types from disk into this scope's type cache, eg. in order to avoid the performance hit associated with proxy generation.

ModuleScope ( ) : System

Initializes a new instance of the ModuleScope class; assemblies created by this instance will not be saved.

ModuleScope ( bool savePhysicalAssembly ) : System

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved.

ModuleScope ( bool savePhysicalAssembly, bool disableSignedModule ) : System

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved.

ModuleScope ( bool savePhysicalAssembly, bool disableSignedModule, INamingScope namingScope, string strongAssemblyName, string strongModulePath, string weakAssemblyName, string weakModulePath ) : System

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved and what simple names are to be assigned to them.

ModuleScope ( bool savePhysicalAssembly, bool disableSignedModule, string strongAssemblyName, string strongModulePath, string weakAssemblyName, string weakModulePath ) : System

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved and what simple names are to be assigned to them.

ObtainDynamicModule ( bool isStrongNamed ) : ModuleBuilder

Gets the specified module generated by this scope, creating a new one if none has yet been generated.

ObtainDynamicModuleWithStrongName ( ) : ModuleBuilder

Gets the strong-named module generated by this scope, creating a new one if none has yet been generated.

ObtainDynamicModuleWithWeakName ( ) : ModuleBuilder

Gets the weak-named module generated by this scope, creating a new one if none has yet been generated.

RegisterInCache ( Castle.DynamicProxy.Generators.CacheKey key, Type type ) : void

Registers a type in this scope's type cache.

SaveAssembly ( ) : string

Saves the generated assembly with the name and directory information given when this ModuleScope instance was created (or with the DEFAULT_FILE_NAME and current directory if none was given).

This method stores the generated assembly in the directory passed as part of the module information specified when this instance was constructed (if any, else the current directory is used). If both a strong-named and a weak-named assembly have been generated, it will throw an exception; in this case, use the SaveAssembly (bool) overload.

If this ModuleScope was created without indicating that the assembly should be saved, this method does nothing.

SaveAssembly ( bool strongNamed ) : string

Saves the specified generated assembly with the name and directory information given when this instance was created (or with the DEFAULT_FILE_NAME and current directory if none was given).

This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was constructed (if any, else the current directory is used).

If this ModuleScope was created without indicating that the assembly should be saved, this method does nothing.

비공개 메소드들

메소드 설명
AddCacheMappings ( AssemblyBuilder builder ) : void
CreateModule ( bool signStrongName ) : ModuleBuilder
GetAssemblyName ( bool signStrongName ) : AssemblyName

메소드 상세

DefineType() 공개 메소드

public DefineType ( bool inSignedModulePreferably, string name, TypeAttributes flags ) : TypeBuilder
inSignedModulePreferably bool
name string
flags TypeAttributes
리턴 System.Reflection.Emit.TypeBuilder

GetFromCache() 공개 메소드

Returns a type from this scope's type cache, or null if the key cannot be found.
public GetFromCache ( Castle.DynamicProxy.Generators.CacheKey key ) : Type
key Castle.DynamicProxy.Generators.CacheKey The key to be looked up in the cache.
리턴 System.Type

GetKeyPair() 공개 정적인 메소드

Gets the key pair used to sign the strong-named assembly generated by this ModuleScope.
public static GetKeyPair ( ) : byte[]
리턴 byte[]

LoadAssemblyIntoCache() 공개 메소드

Loads the generated types from the given assembly into this ModuleScope's cache.
This method can be used to load previously generated and persisted proxy types from disk into this scope's type cache, eg. in order to avoid the performance hit associated with proxy generation.
public LoadAssemblyIntoCache ( Assembly assembly ) : void
assembly System.Reflection.Assembly The assembly to load types from. This assembly must have been saved via or /// , or it must have the manually applied.
리턴 void

ModuleScope() 공개 메소드

Initializes a new instance of the ModuleScope class; assemblies created by this instance will not be saved.
public ModuleScope ( ) : System
리턴 System

ModuleScope() 공개 메소드

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved.
public ModuleScope ( bool savePhysicalAssembly ) : System
savePhysicalAssembly bool If set to true saves the generated module.
리턴 System

ModuleScope() 공개 메소드

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved.
public ModuleScope ( bool savePhysicalAssembly, bool disableSignedModule ) : System
savePhysicalAssembly bool If set to true saves the generated module.
disableSignedModule bool If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions.
리턴 System

ModuleScope() 공개 메소드

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved and what simple names are to be assigned to them.
public ModuleScope ( bool savePhysicalAssembly, bool disableSignedModule, INamingScope namingScope, string strongAssemblyName, string strongModulePath, string weakAssemblyName, string weakModulePath ) : System
savePhysicalAssembly bool If set to true saves the generated module.
disableSignedModule bool If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions.
namingScope INamingScope Naming scope used to provide unique names to generated types and their members (usually via sub-scopes).
strongAssemblyName string The simple name of the strong-named assembly generated by this .
strongModulePath string The path and file name of the manifest module of the strong-named assembly generated by this .
weakAssemblyName string The simple name of the weak-named assembly generated by this .
weakModulePath string The path and file name of the manifest module of the weak-named assembly generated by this .
리턴 System

ModuleScope() 공개 메소드

Initializes a new instance of the ModuleScope class, allowing to specify whether the assemblies generated by this instance should be saved and what simple names are to be assigned to them.
public ModuleScope ( bool savePhysicalAssembly, bool disableSignedModule, string strongAssemblyName, string strongModulePath, string weakAssemblyName, string weakModulePath ) : System
savePhysicalAssembly bool If set to true saves the generated module.
disableSignedModule bool If set to true disables ability to generate signed module. This should be used in cases where ran under constrained permissions.
strongAssemblyName string The simple name of the strong-named assembly generated by this .
strongModulePath string The path and file name of the manifest module of the strong-named assembly generated by this .
weakAssemblyName string The simple name of the weak-named assembly generated by this .
weakModulePath string The path and file name of the manifest module of the weak-named assembly generated by this .
리턴 System

ObtainDynamicModule() 공개 메소드

Gets the specified module generated by this scope, creating a new one if none has yet been generated.
public ObtainDynamicModule ( bool isStrongNamed ) : ModuleBuilder
isStrongNamed bool If set to true, a strong-named module is returned; otherwise, a weak-named module is returned.
리턴 System.Reflection.Emit.ModuleBuilder

ObtainDynamicModuleWithStrongName() 공개 메소드

Gets the strong-named module generated by this scope, creating a new one if none has yet been generated.
public ObtainDynamicModuleWithStrongName ( ) : ModuleBuilder
리턴 System.Reflection.Emit.ModuleBuilder

ObtainDynamicModuleWithWeakName() 공개 메소드

Gets the weak-named module generated by this scope, creating a new one if none has yet been generated.
public ObtainDynamicModuleWithWeakName ( ) : ModuleBuilder
리턴 System.Reflection.Emit.ModuleBuilder

RegisterInCache() 공개 메소드

Registers a type in this scope's type cache.
public RegisterInCache ( Castle.DynamicProxy.Generators.CacheKey key, Type type ) : void
key Castle.DynamicProxy.Generators.CacheKey The key to be associated with the type.
type System.Type The type to be stored in the cache.
리턴 void

SaveAssembly() 공개 메소드

Saves the generated assembly with the name and directory information given when this ModuleScope instance was created (or with the DEFAULT_FILE_NAME and current directory if none was given).

This method stores the generated assembly in the directory passed as part of the module information specified when this instance was constructed (if any, else the current directory is used). If both a strong-named and a weak-named assembly have been generated, it will throw an exception; in this case, use the SaveAssembly (bool) overload.

If this ModuleScope was created without indicating that the assembly should be saved, this method does nothing.

Both a strong-named and a weak-named assembly have been generated.
public SaveAssembly ( ) : string
리턴 string

SaveAssembly() 공개 메소드

Saves the specified generated assembly with the name and directory information given when this instance was created (or with the DEFAULT_FILE_NAME and current directory if none was given).

This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was constructed (if any, else the current directory is used).

If this ModuleScope was created without indicating that the assembly should be saved, this method does nothing.

No assembly has been generated that matches the parameter. ///
public SaveAssembly ( bool strongNamed ) : string
strongNamed bool True if the generated assembly with a strong name should be saved (see ); /// false if the generated assembly without a strong name should be saved (see .
리턴 string

프로퍼티 상세

DEFAULT_ASSEMBLY_NAME 공개적으로 정적으로 프로퍼티

The default assembly (simple) name used for the assemblies generated by a ModuleScope instance.
public static String DEFAULT_ASSEMBLY_NAME
리턴 String

DEFAULT_FILE_NAME 공개적으로 정적으로 프로퍼티

The default file name used when the assembly is saved using DEFAULT_FILE_NAME.
public static String DEFAULT_FILE_NAME
리턴 String