C# Класс XSpect.Yacq.SystemObjects.YacqType

Defines and creates new instances of types with YACQ codes during run time.
Показать файл Открыть проект

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

Метод Описание
Create ( SymbolTable symbols = null ) : Type

Creates a Type object for the type. After defining members on the type, this method is called in order to load its Type object.

DefineConstructor ( Expression body ) : ConstructorBuilder

Defines a new public constructor to the type.

DefineConstructor ( IList parameterTypes, Expression body ) : ConstructorBuilder

Defines a new public constructor to the type.

DefineConstructor ( MethodAttributes attributes, Expression body ) : ConstructorBuilder

Defines a new constructor to the type.

DefineConstructor ( MethodAttributes attributes, IList parameterTypes, Expression body ) : ConstructorBuilder

Defines a new constructor to the type.

DefineField ( String name, Type type ) : FieldBuilder

Defines a new field to the type.

DefineField ( String name, Type type, Expression initializer ) : FieldBuilder

Defines a new public instance field to the type.

DefineField ( String name, Type type, FieldAttributes attributes ) : FieldBuilder

Defines a new field to the type.

DefineField ( String name, Type type, FieldAttributes attributes, Expression initializer ) : FieldBuilder

Defines a new field to the type.

DefineMethod ( String name, MethodAttributes attributes, Type returnType, Expression body ) : MethodBuilder

Defines a new method to the type.

DefineMethod ( String name, MethodAttributes attributes, Type returnType, IList parameterTypes, Expression body ) : MethodBuilder

Defines a new method to the type.

DefineMethod ( String name, Type returnType, Expression body ) : MethodBuilder

Defines a new public instance method to the type.

DefineMethod ( String name, Type returnType, IList parameterTypes, Expression body ) : MethodBuilder

Defines a new public instance method to the type.

DefineProperty ( String name, Type type ) : PropertyBuilder

Defines a new auto-implemented property to the type.

DefineProperty ( String name, Type type, Expression initializer ) : PropertyBuilder

Defines a new public instance auto-implemented property to the type.

DefineProperty ( String name, Type type, Expression getter, Expression setter ) : PropertyBuilder

Defines a new public instance property to the type.

DefineProperty ( String name, Type type, MethodAttributes methodAttributes ) : PropertyBuilder

Defines a new auto-implemented property to the type.

DefineProperty ( String name, Type type, MethodAttributes methodAttributes, Expression initializer ) : PropertyBuilder

Defines a new auto-implemented property to the type.

DefineProperty ( String name, Type type, MethodAttributes methodAttributes, Expression getter, Expression setter ) : PropertyBuilder

Defines a new property to the type.

DefineProperty ( String name, Type type, MethodAttributes methodAttributes, Expression initializer, Expression getter, Expression setter ) : PropertyBuilder

Defines a new property to the type.

GetConstructors ( ) : IEnumerable

Returns all the defined constructors in the type.

GetFields ( ) : IEnumerable

Returns all the defined fields in the type.

GetMembers ( ) : IEnumerable

Returns all the defined members in the type.

GetMethods ( ) : IEnumerable

Returns all the defined methods in the type.

GetProperties ( ) : IEnumerable

Returns all the defined properties in the type.

YacqType ( ModuleBuilder module, String name, IEnumerable baseTypes ) : System

Initializes a new instance of the YacqType class.

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

Метод Описание
GetName ( MemberInfo member, String suffix ) : String
LoadArgs ( ILGenerator generator ) : void
LoadArgs ( ILGenerator generator, IEnumerable indexes ) : void
RequestInitializing ( MethodBuilder method, Expression expression, Type returnType, IEnumerable parameterTypes ) : void

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

Create() публичный Метод

Creates a Type object for the type. After defining members on the type, this method is called in order to load its Type object.
public Create ( SymbolTable symbols = null ) : Type
symbols XSpect.Yacq.Symbols.SymbolTable The additional symbol table for reducing.
Результат System.Type

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

Defines a new public constructor to the type.
public DefineConstructor ( Expression body ) : ConstructorBuilder
body System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the constructor, with parameters for "this" instance and all method parameters, returns no value.
Результат System.Reflection.Emit.ConstructorBuilder

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

Defines a new public constructor to the type.
public DefineConstructor ( IList parameterTypes, Expression body ) : ConstructorBuilder
parameterTypes IList The types of the parameters of the constructor.
body System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the constructor, with parameters for "this" instance and all method parameters, returns no value.
Результат System.Reflection.Emit.ConstructorBuilder

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

Defines a new constructor to the type.
public DefineConstructor ( MethodAttributes attributes, Expression body ) : ConstructorBuilder
attributes MethodAttributes A bitwise combination of the constructor attributes.
body System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the constructor, with parameters for "this" instance and all method parameters, returns no value.
Результат System.Reflection.Emit.ConstructorBuilder

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

Defines a new constructor to the type.
public DefineConstructor ( MethodAttributes attributes, IList parameterTypes, Expression body ) : ConstructorBuilder
attributes MethodAttributes A bitwise combination of the constructor attributes.
parameterTypes IList The types of the parameters of the constructor.
body System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the constructor, with parameters for "this" instance and all method parameters, returns no value.
Результат System.Reflection.Emit.ConstructorBuilder

DefineField() публичный Метод

Defines a new field to the type.
public DefineField ( String name, Type type ) : FieldBuilder
name String The name of the field. cannot contain embedded nulls.
type System.Type The type of the field/
Результат System.Reflection.Emit.FieldBuilder

DefineField() публичный Метод

Defines a new public instance field to the type.
public DefineField ( String name, Type type, Expression initializer ) : FieldBuilder
name String The name of the field. cannot contain embedded nulls.
type System.Type The type of the field/
initializer System.Linq.Expressions.Expression The expression which is not reduced to be for the initializer of the field, with a parameter for "this" instance, returns value.
Результат System.Reflection.Emit.FieldBuilder

DefineField() публичный Метод

Defines a new field to the type.
public DefineField ( String name, Type type, FieldAttributes attributes ) : FieldBuilder
name String The name of the field. cannot contain embedded nulls.
type System.Type The type of the field/
attributes FieldAttributes A bitwise combination of the field attributes.
Результат System.Reflection.Emit.FieldBuilder

DefineField() публичный Метод

Defines a new field to the type.
public DefineField ( String name, Type type, FieldAttributes attributes, Expression initializer ) : FieldBuilder
name String The name of the field. cannot contain embedded nulls.
type System.Type The type of the field/
attributes FieldAttributes A bitwise combination of the field attributes.
initializer System.Linq.Expressions.Expression The expression which is not reduced to be for the initializer of the field, with a parameter for "this" instance, returns value.
Результат System.Reflection.Emit.FieldBuilder

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

Defines a new method to the type.
public DefineMethod ( String name, MethodAttributes attributes, Type returnType, Expression body ) : MethodBuilder
name String The name of the method. cannot contain embedded nulls.
attributes MethodAttributes A bitwise combination of the method attributes.
returnType System.Type The return type of the method.
body System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the method, with parameters for "this" instance and all method parameters, returns value.
Результат System.Reflection.Emit.MethodBuilder

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

Defines a new method to the type.
public DefineMethod ( String name, MethodAttributes attributes, Type returnType, IList parameterTypes, Expression body ) : MethodBuilder
name String The name of the method. cannot contain embedded nulls.
attributes MethodAttributes A bitwise combination of the method attributes.
returnType System.Type The return type of the method.
parameterTypes IList The types of the parameters of the method.
body System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the method, with parameters for "this" instance and all method parameters, returns value.
Результат System.Reflection.Emit.MethodBuilder

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

Defines a new public instance method to the type.
public DefineMethod ( String name, Type returnType, Expression body ) : MethodBuilder
name String The name of the method. cannot contain embedded nulls.
returnType System.Type The return type of the method.
body System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the method, with parameters for "this" instance and all method parameters, returns value.
Результат System.Reflection.Emit.MethodBuilder

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

Defines a new public instance method to the type.
public DefineMethod ( String name, Type returnType, IList parameterTypes, Expression body ) : MethodBuilder
name String The name of the method. cannot contain embedded nulls.
returnType System.Type The return type of the method.
parameterTypes IList The types of the parameters of the method.
body System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the method, with parameters for "this" instance and all method parameters, returns value.
Результат System.Reflection.Emit.MethodBuilder

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

Defines a new auto-implemented property to the type.
public DefineProperty ( String name, Type type ) : PropertyBuilder
name String The name of the property. cannot contain embedded nulls.
type System.Type The type of the property.
Результат System.Reflection.Emit.PropertyBuilder

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

Defines a new public instance auto-implemented property to the type.
public DefineProperty ( String name, Type type, Expression initializer ) : PropertyBuilder
name String The name of the property. cannot contain embedded nulls.
type System.Type The type of the property.
initializer System.Linq.Expressions.Expression The expression which is not reduced to be for the initializer of the backing field, with a parameter for "this" instance, returns value.
Результат System.Reflection.Emit.PropertyBuilder

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

Defines a new public instance property to the type.
public DefineProperty ( String name, Type type, Expression getter, Expression setter ) : PropertyBuilder
name String The name of the property. cannot contain embedded nulls.
type System.Type The type of the property.
getter System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the getter of the property, with parameters for "this" instance, returns value, if the getter will be auto-implemented and accesses to the backing field, or null if this property does not have getter.
setter System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the setter of the property, with parameters for "this" instance and value, returns no value, if the setter will be auto-implemented and accesses to the backing field, or null if this property does not have setter.
Результат System.Reflection.Emit.PropertyBuilder

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

Defines a new auto-implemented property to the type.
public DefineProperty ( String name, Type type, MethodAttributes methodAttributes ) : PropertyBuilder
name String The name of the property. cannot contain embedded nulls.
type System.Type The type of the property.
methodAttributes MethodAttributes A bitwise combination of the accessor method attributes.
Результат System.Reflection.Emit.PropertyBuilder

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

Defines a new auto-implemented property to the type.
public DefineProperty ( String name, Type type, MethodAttributes methodAttributes, Expression initializer ) : PropertyBuilder
name String The name of the property. cannot contain embedded nulls.
type System.Type The type of the property.
methodAttributes MethodAttributes A bitwise combination of the accessor method attributes.
initializer System.Linq.Expressions.Expression The expression which is not reduced to be for the initializer of the backing field, with a parameter for "this" instance, returns value.
Результат System.Reflection.Emit.PropertyBuilder

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

Defines a new property to the type.
public DefineProperty ( String name, Type type, MethodAttributes methodAttributes, Expression getter, Expression setter ) : PropertyBuilder
name String The name of the property. cannot contain embedded nulls.
type System.Type The type of the property.
methodAttributes MethodAttributes A bitwise combination of the accessor method attributes.
getter System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the getter of the property, with parameters for "this" instance, returns value, if the getter will be auto-implemented and accesses to the backing field, or null if this property does not have getter.
setter System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the setter of the property, with parameters for "this" instance and value, returns no value, if the setter will be auto-implemented and accesses to the backing field, or null if this property does not have setter.
Результат System.Reflection.Emit.PropertyBuilder

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

Defines a new property to the type.
public DefineProperty ( String name, Type type, MethodAttributes methodAttributes, Expression initializer, Expression getter, Expression setter ) : PropertyBuilder
name String The name of the property. cannot contain embedded nulls.
type System.Type The type of the property.
methodAttributes MethodAttributes A bitwise combination of the accessor method attributes.
initializer System.Linq.Expressions.Expression The expression which is not reduced to be for the initializer of the backing field, with a parameter for "this" instance, returns value.
getter System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the getter of the property, with parameters for "this" instance, returns value, if the getter will be auto-implemented and accesses to the backing field, or null if this property does not have getter.
setter System.Linq.Expressions.Expression The expression which is not reduced to be for the body of the setter of the property, with parameters for "this" instance and value, returns no value, if the setter will be auto-implemented and accesses to the backing field, or null if this property does not have setter.
Результат System.Reflection.Emit.PropertyBuilder

GetConstructors() публичный Метод

Returns all the defined constructors in the type.
public GetConstructors ( ) : IEnumerable
Результат IEnumerable

GetFields() публичный Метод

Returns all the defined fields in the type.
public GetFields ( ) : IEnumerable
Результат IEnumerable

GetMembers() публичный Метод

Returns all the defined members in the type.
public GetMembers ( ) : IEnumerable
Результат IEnumerable

GetMethods() публичный Метод

Returns all the defined methods in the type.
public GetMethods ( ) : IEnumerable
Результат IEnumerable

GetProperties() публичный Метод

Returns all the defined properties in the type.
public GetProperties ( ) : IEnumerable
Результат IEnumerable

YacqType() публичный Метод

Initializes a new instance of the YacqType class.
public YacqType ( ModuleBuilder module, String name, IEnumerable baseTypes ) : System
module System.Reflection.Emit.ModuleBuilder Target module to define new type.
name String The full path of the type. name cannot contain embedded nulls.
baseTypes IEnumerable The list of the deriving type and interfaces that the type implements. The deriving type must be first in the list.
Результат System