C# Class NProxy.Core.ProxyTypeBuilderFactory

Represents a proxy type builder factory.
Inheritance: ITypeBuilderFactory, ITypeRepository
Exibir arquivo Open project: mtamme/NProxy

Public Methods

Method Description
CreateBuilder ( Type parentType ) : ITypeBuilder
DefineType ( string typeName, Type parentType ) : TypeBuilder
GetType ( MethodInfo methodInfo ) : Type
ProxyTypeBuilderFactory ( bool canSaveAssembly ) : System

Initializes a new instance of the ProxyTypeBuilderFactory class.

SaveAssembly ( string path ) : void

Saves the dynamic assembly to disk.

Private Methods

Method Description
DefineDynamicAssembly ( string name, bool canSaveAssembly ) : AssemblyBuilder

Defines the dynamic assembly.

GetDynamicAssemblyKeyPair ( ) : StrongNameKeyPair

Returns the dynamic assembly key pair.

GetDynamicAssemblyName ( string assemblyName ) : AssemblyName

Returns the dynamic assembly name.

GetExecutingAssemblyName ( ) : AssemblyName

Returns the executing assembly name.

ReadToEnd ( Stream stream ) : byte[]

Reads all bytes from the current position to the end of the specified stream.

Method Details

CreateBuilder() public method

public CreateBuilder ( Type parentType ) : ITypeBuilder
parentType System.Type
return ITypeBuilder

DefineType() public method

public DefineType ( string typeName, Type parentType ) : TypeBuilder
typeName string
parentType System.Type
return System.Reflection.Emit.TypeBuilder

GetType() public method

public GetType ( MethodInfo methodInfo ) : Type
methodInfo System.Reflection.MethodInfo
return System.Type

ProxyTypeBuilderFactory() public method

Initializes a new instance of the ProxyTypeBuilderFactory class.
public ProxyTypeBuilderFactory ( bool canSaveAssembly ) : System
canSaveAssembly bool A value indicating whether the assembly can be saved.
return System

SaveAssembly() public method

Saves the dynamic assembly to disk.
public SaveAssembly ( string path ) : void
path string The path of the assembly.
return void