C# Класс NProxy.Core.Internal.Reflection.Emit.TypeBuilderExtensions

Provides TypeBuilder extension methods.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

DefineConstructor() публичный статический Метод

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.
Результат System.Reflection.Emit.ConstructorBuilder

DefineConstructor() публичный статический Метод

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.
Результат System.Reflection.Emit.ConstructorBuilder

DefineEvent() публичный статический Метод

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.
Результат void

DefineGenericParameters() публичный статический Метод

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.
Результат System.Type[]

DefineMethod() публичный статический Метод

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.
Результат System.Reflection.Emit.MethodBuilder

DefineProperty() публичный статический Метод

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.
Результат void

SetCustomAttribute() публичный статический Метод

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.
Результат void