C# Class NProxy.Core.Internal.Reflection.Emit.TypeBuilderExtensions

Provides TypeBuilder extension methods.
Exibir arquivo Open project: mtamme/NProxy

Public Methods

Method Description
DefineConstructor ( this typeBuilder, ConstructorInfo constructorInfo, IEnumerable additionalParameterTypes, IEnumerable additionalParameterNames ) : ConstructorBuilder

Defines a constructor based on the specified constructor.

DefineConstructor ( this typeBuilder, MethodAttributes methodAttributes, CallingConventions callingConvention, Type parameterTypes, string parameterNames ) : ConstructorBuilder

Defines a constructor.

DefineEvent ( this typeBuilder, EventInfo eventInfo, bool isExplicit, Func methodBuilderFactory ) : void

Defines an event based on the specified event.

DefineGenericParameters ( this typeBuilder, Type genericTypes ) : System.Type[]

Defines the generic type parameters.

Custom attributes are not considered by this method.

DefineMethod ( this typeBuilder, MethodInfo methodInfo, bool isExplicit, bool isOverride ) : MethodBuilder

Defines a method based on the specified method.

DefineProperty ( this typeBuilder, PropertyInfo propertyInfo, bool isExplicit, Func methodBuilderFactory ) : void

Defines a property based on the specified property.

SetCustomAttribute ( this typeBuilder, ConstructorInfo constructorInfo, object arguments ) : void

Sets the specified custom attribute.

Private Methods

Method Description
DefineParameters ( this constructorBuilder, ConstructorInfo constructorInfo, IEnumerable additionalParameterNames ) : void

Defines the constructor parameters based on the specified constructor.

DefineParameters ( this constructorBuilder, IEnumerable parameterNames ) : void

Defines the constructor parameters.

Method Details

DefineConstructor() public static method

Defines a constructor based on the specified constructor.
public static DefineConstructor ( this typeBuilder, ConstructorInfo constructorInfo, IEnumerable additionalParameterTypes, IEnumerable additionalParameterNames ) : ConstructorBuilder
typeBuilder this The type builder.
constructorInfo System.Reflection.ConstructorInfo The constructor information.
additionalParameterTypes IEnumerable The additional parameter types.
additionalParameterNames IEnumerable The additional parameter names.
return System.Reflection.Emit.ConstructorBuilder

DefineConstructor() public static method

Defines a constructor.
public static DefineConstructor ( this typeBuilder, MethodAttributes methodAttributes, CallingConventions callingConvention, Type parameterTypes, string parameterNames ) : ConstructorBuilder
typeBuilder this The type builder.
methodAttributes MethodAttributes The method attributes.
callingConvention CallingConventions The calling convention.
parameterTypes System.Type The parameter types.
parameterNames string The parameter names.
return System.Reflection.Emit.ConstructorBuilder

DefineEvent() public static method

Defines an event based on the specified event.
public static DefineEvent ( this typeBuilder, EventInfo eventInfo, bool isExplicit, Func methodBuilderFactory ) : void
typeBuilder this The type builder.
eventInfo System.Reflection.EventInfo The event information.
isExplicit bool A value indicating whether the specified event should be implemented explicitly.
methodBuilderFactory Func The method builder factory function.
return void

DefineGenericParameters() public static method

Defines the generic type parameters.
Custom attributes are not considered by this method.
public static DefineGenericParameters ( this typeBuilder, Type genericTypes ) : System.Type[]
typeBuilder this The type builder.
genericTypes System.Type The generic types.
return System.Type[]

DefineMethod() public static method

Defines a method based on the specified method.
public static DefineMethod ( this typeBuilder, MethodInfo methodInfo, bool isExplicit, bool isOverride ) : MethodBuilder
typeBuilder this The type builder.
methodInfo System.Reflection.MethodInfo The method information.
isExplicit bool A value indicating whether the specified method should be implemented explicitly.
isOverride bool A value indicating whether the specified method should be overridden.
return System.Reflection.Emit.MethodBuilder

DefineProperty() public static method

Defines a property based on the specified property.
public static DefineProperty ( this typeBuilder, PropertyInfo propertyInfo, bool isExplicit, Func methodBuilderFactory ) : void
typeBuilder this The type builder.
propertyInfo System.Reflection.PropertyInfo The property information.
isExplicit bool A value indicating whether the specified property should be implemented explicitly.
methodBuilderFactory Func The method builder factory function.
return void

SetCustomAttribute() public static method

Sets the specified custom attribute.
public static SetCustomAttribute ( this typeBuilder, ConstructorInfo constructorInfo, object arguments ) : void
typeBuilder this The type builder.
constructorInfo System.Reflection.ConstructorInfo The constructor information.
arguments object The constructor arguments.
return void