System.Reflection.Emit Namespace

System.Reflection.Emit 命名空間 (Namespace) 包含允許編譯器 (Compiler) 或工具發出中繼資料 (Metadata) 和 Microsoft Intermediate Language (MSIL) 的類別,並且選擇性地在磁碟上產生可攜式執行檔。 The System.Reflection.Emit namespace contains classes that allow a compiler or tool to emit metadata and Microsoft intermediate language (MSIL) and optionally generate a PE file on disk. 這些類別的主要用戶端是指令碼引擎和編譯器。 The primary clients of these classes are script engines and compilers.

類別

AssemblyBuilder

定義並顯示動態組件。Defines and represents a dynamic assembly.

ConstructorBuilder

定義或表示動態 (Dynamic) 類別的建構函式。Defines and represents a constructor of a dynamic class.

CustomAttributeBuilder

協助建立自訂屬性 (Attribute)。Helps build custom attributes.

DynamicILInfo

提供產生動態方法之 Microsoft Intermediate Language (MSIL) 和中繼資料 (Metadata) 的替代方式支援,包括用以建立語彙基元 (Token) 和插入程式碼的方法、例外狀況處理 (Exception Handling) 以及區域變數簽章 Blob (二進位大型物件)。Provides support for alternative ways to generate the Microsoft intermediate language (MSIL) and metadata for a dynamic method, including methods for creating tokens and for inserting the code, exception handling, and local variable signature blobs.

DynamicMethod

定義及表示可以編譯、執行和捨棄的動態方法。Defines and represents a dynamic method that can be compiled, executed, and discarded. 捨棄的方法可被記憶體回收。Discarded methods are available for garbage collection.

EnumBuilder

描述和表示列舉型別 (Enumeration)。Describes and represents an enumeration type.

EventBuilder

定義類別的事件。Defines events for a class.

FieldBuilder

定義和表示欄位。Defines and represents a field. 這個類別無法被繼承。This class cannot be inherited.

GenericTypeParameterBuilder

為動態定義的泛型型別和方法定義並建立泛型型別參數。Defines and creates generic type parameters for dynamically defined generic types and methods. 這個類別無法被繼承。This class cannot be inherited.

ILGenerator

產生 Microsoft Intermediate Language (MSIL) 指令。Generates Microsoft intermediate language (MSIL) instructions.

LocalBuilder

表示方法或建構函式 (Constructor) 中的區域變數。Represents a local variable within a method or constructor.

MethodBuilder

在動態類別上定義及表示方法 (或建構函式)。Defines and represents a method (or constructor) on a dynamic class.

MethodRental

提供一個交換方法主體實作的快速方法 (如果是類別的方法)。Provides a fast way to swap method body implementation given a method of a class.

ModuleBuilder

定義及表示動態組件中的模組。Defines and represents a module in a dynamic assembly.

OpCodes

提供 Microsoft Intermediate Language (MSIL) 指令的欄位表示,以用於 ILGenerator 類別成員 (例如 Emit(OpCode)) 的發出。Provides field representations of the Microsoft Intermediate Language (MSIL) instructions for emission by the ILGenerator class members (such as Emit(OpCode)).

ParameterBuilder

建立或關聯參數資訊。Creates or associates parameter information.

PropertyBuilder

定義型別的屬性。Defines the properties for a type.

SignatureHelper

提供建置簽章的方法。Provides methods for building signatures.

TypeBuilder

在執行階段定義和建立類別的新執行個體。Defines and creates new instances of classes during run time.

UnmanagedMarshal

表示描述如何從 Managed 到 Unmanaged 程式碼封送處理欄位的類別。Represents the class that describes how to marshal a field from managed to unmanaged code. 這個類別無法被繼承。This class cannot be inherited.

結構

EventToken

表示中繼資料 (Metadata) 所傳回的 Token,來表示事件。Represents the Token returned by the metadata to represent an event.

ExceptionHandler

代表 IL 位元組陣列中要傳遞至方法的例外狀況處理常式,例如 SetMethodBody(Byte[], Int32, Byte[], IEnumerable<ExceptionHandler>, IEnumerable<Int32>)Represents an exception handler in a byte array of IL to be passed to a method such as SetMethodBody(Byte[], Int32, Byte[], IEnumerable<ExceptionHandler>, IEnumerable<Int32>).

FieldToken

FieldToken 結構是表示欄位之語彙基元的物件表示。The FieldToken struct is an object representation of a token that represents a field.

Label

表示指令資料流中的標記 (Label)。Represents a label in the instruction stream. Label 會與 ILGenerator 類別結合使用。Label is used in conjunction with the ILGenerator class.

MethodToken

MethodToken 結構是表示方法之語彙基元 (Token) 的物件表示。The MethodToken struct is an object representation of a token that represents a method.

OpCode

描述中繼語言 (IL) 指令。Describes an intermediate language (IL) instruction.

ParameterToken

ParameterToken 結構是語彙基元 (Token) 的不透明表示,由中繼資料 (Metadata) 傳回以表示參數。The ParameterToken struct is an opaque representation of the token returned by the metadata to represent a parameter.

PropertyToken

PropertyToken 結構是 Token 的不透明表示,由中繼資料 (Metadata) 傳回以表示屬性。The PropertyToken struct is an opaque representation of the Token returned by the metadata to represent a property.

SignatureToken

表示由要表示簽章之中繼資料 (Metadata) 所傳回的 TokenRepresents the Token returned by the metadata to represent a signature.

StringToken

表示代表字串的語彙基元 (Token)。Represents a token that represents a string.

TypeToken

表示 Token 由要表示型別的中繼資料 (Metadata) 所傳回。Represents the Token returned by the metadata to represent a type.

列舉

AssemblyBuilderAccess

定義動態組件的存取模式。Defines the access modes for a dynamic assembly.

FlowControl

描述指令如何變更控制流程。Describes how an instruction alters the flow of control.

OpCodeType

描述此 Microsoft Intermediate Language (MSIL) 指令的類型。Describes the types of the Microsoft intermediate language (MSIL) instructions.

OperandType

描述此 Microsoft Intermediate Language (MSIL) 指令的運算元類型。Describes the operand type of Microsoft intermediate language (MSIL) instruction.

PackingSize

指定兩個因數其中之一,可在封送處型別時決定欄位的記憶體對齊 (Alignment)。Specifies one of two factors that determine the memory alignment of fields when a type is marshaled.

PEFileKinds

指定可移植執行檔 (PE) 的型別。Specifies the type of the portable executable (PE) file.

StackBehaviour

描述如何將值推入至堆疊或從堆疊取出。Describes how values are pushed onto a stack or popped off a stack.