C# Класс CK.Reflection.EmitHelper

Collection of helpers to emit dynamic code.
Показать файл Открыть проект

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

Метод Описание
ImplementEmptyStubMethod ( TypeBuilder tB, MethodInfo method, bool isVirtual = false ) : MethodBuilder

Implements a method as a no operation method. Method can be virtual, abstract or not.

ImplementStubProperty ( TypeBuilder tB, PropertyInfo property, bool isVirtual = false ) : PropertyBuilder

Implement a property with getter/setter that relies on a private backup field. This is useful only to provide a temporary implementation of abstract properties that would be generated in a second time (this does not provide more than auto implemented properties available in C# 3.0 and later.

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

Метод Описание
EmitEmptyImplementation ( MethodBuilder vM, Type returnType, ParameterInfo parameters ) : void

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

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

Implements a method as a no operation method. Method can be virtual, abstract or not.
public static ImplementEmptyStubMethod ( TypeBuilder tB, MethodInfo method, bool isVirtual = false ) : MethodBuilder
tB System.Reflection.Emit.TypeBuilder The for the new type.
method System.Reflection.MethodInfo The method to implement.
isVirtual bool Defaults to false: the method is sealed. True to keep the method virtual.
Результат System.Reflection.Emit.MethodBuilder

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

Implement a property with getter/setter that relies on a private backup field. This is useful only to provide a temporary implementation of abstract properties that would be generated in a second time (this does not provide more than auto implemented properties available in C# 3.0 and later.
public static ImplementStubProperty ( TypeBuilder tB, PropertyInfo property, bool isVirtual = false ) : PropertyBuilder
tB System.Reflection.Emit.TypeBuilder The for the new type.
property System.Reflection.PropertyInfo The property to implement.
isVirtual bool Defaults to false: the method is sealed. True to keep the method virtual.
Результат System.Reflection.Emit.PropertyBuilder