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

Provides TypeBuilder extension methods.
Afficher le fichier Open project: mtamme/NProxy

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat System.Reflection.Emit.ConstructorBuilder

DefineConstructor() public static méthode

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.
Résultat System.Reflection.Emit.ConstructorBuilder

DefineEvent() public static méthode

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.
Résultat void

DefineGenericParameters() public static méthode

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.
Résultat System.Type[]

DefineMethod() public static méthode

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.
Résultat System.Reflection.Emit.MethodBuilder

DefineProperty() public static méthode

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.
Résultat void

SetCustomAttribute() public static méthode

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.
Résultat void