System.Reflection.Metadata 命名空间

System.Reflection.Metadata 命名空间包含表示托管代码中程序集、模块、成员、参数和其他实体的元数据信息的类型。 The System.Reflection.Metadata namespace contains types that represent metadata information about assemblies, modules, members, parameters, and other entities in managed code.

AssemblyExtensions
BlobBuilder
DebugMetadataHeader
HandleComparer
ILOpCodeExtensions
ImageFormatLimitationException

写入元数据的尝试超过格式规范提供的限制时引发的异常。The exception that is thrown when an attempt to write metadata exceeds a limit given by the format specification. 例如,超过堆大小限制时。For example, when the heap size limit is exceeded.

MetadataReader

读取 ECMA 335 CLI 规范定义的元数据。Reads metadata as defined by the ECMA 335 CLI specification.

MetadataReaderProvider

为存储在字节数组、内存块或流中的元数据提供 MetadataReaderProvides a MetadataReader for metadata stored in an array of bytes, a memory block, or a stream.

MetadataStringDecoder

MetadataReader 提供一种自定义机制,用于解码表示文本的元数据中的字节序列。Provides the MetadataReader with a custom mechanism for decoding byte sequences in metadata that represent text.

MethodBodyBlock
PEReaderExtensions

结构

ArrayShape

表示数组类型的形状。Represents the shape of an array type.

AssemblyDefinition
AssemblyDefinitionHandle
AssemblyFile
AssemblyFileHandle
AssemblyFileHandleCollection

表示 AssemblyFileHandle 的集合。Represents a collection of AssemblyFileHandle.

AssemblyFileHandleCollection.Enumerator
AssemblyReference
AssemblyReferenceHandle
AssemblyReferenceHandleCollection

程序集引用的集合。A collection of assembly references.

AssemblyReferenceHandleCollection.Enumerator
Blob
BlobBuilder.Blobs
BlobContentId
BlobHandle
BlobReader
BlobWriter
Constant
ConstantHandle
CustomAttribute
CustomAttributeHandle
CustomAttributeHandleCollection
CustomAttributeHandleCollection.Enumerator
CustomAttributeNamedArgument<TType>

表示从自定义属性签名中解码的命名参数。Represents a named argument decoded from a custom attribute signature.

CustomAttributeTypedArgument<TType>

表示自定义元数据特性的类型化参数。Represents a typed argument for a custom metadata attribute.

CustomAttributeValue<TType>

表示 TType 指定的类型的自定义属性。Represents a custom attribute of the type specified by TType.

CustomDebugInformation
CustomDebugInformationHandle
CustomDebugInformationHandleCollection
CustomDebugInformationHandleCollection.Enumerator
DeclarativeSecurityAttribute
DeclarativeSecurityAttributeHandle
DeclarativeSecurityAttributeHandleCollection
DeclarativeSecurityAttributeHandleCollection.Enumerator
Document

调试元数据中的源文档。The source document in the debug metadata.

DocumentHandle
DocumentHandleCollection
DocumentHandleCollection.Enumerator
DocumentNameBlobHandle

一个 BlobHandle,表示可移植 PDB 中 #Blob 堆上的 blob,其结构为文档名称。A BlobHandle representing a blob on #Blob heap in Portable PDB structured as Document Name.

EntityHandle

表示元数据实体(如类型引用、类型定义、类型规范、方法定义或自定义特性)。Represents a metadata entity (such as a type reference, type definition, type specification, method definition, or custom attribute).

EventAccessors
EventDefinition
EventDefinitionHandle
EventDefinitionHandleCollection
EventDefinitionHandleCollection.Enumerator
ExceptionRegion
ExportedType
ExportedTypeHandle
ExportedTypeHandleCollection

表示 TypeReferenceHandle 实例的集合。Represents a collection of TypeReferenceHandle instances.

ExportedTypeHandleCollection.Enumerator
FieldDefinition
FieldDefinitionHandle
FieldDefinitionHandleCollection
FieldDefinitionHandleCollection.Enumerator
GenericParameter
GenericParameterConstraint
GenericParameterConstraintHandle
GenericParameterConstraintHandleCollection

表示泛型类型参数的约束集合。Represents a collection of constraints of a generic type parameter.

GenericParameterConstraintHandleCollection.Enumerator
GenericParameterHandle
GenericParameterHandleCollection

表示方法或类型的泛型类型参数的集合。Represents a collection of generic type parameters of a method or type.

GenericParameterHandleCollection.Enumerator
GuidHandle
Handle

表示任何元数据实体(如类型引用、类型定义、类型规范、方法定义或自定义特性)或值(字符串、blob、GUID 或用户字符串)。Represents any metadata entity (such as a type reference, a type definition, a type specification, a method definition, or a custom attribute) or value (a string, blob, guid, or user string).

ImportDefinition
ImportDefinitionCollection
ImportDefinitionCollection.Enumerator
ImportScope

介绍可在其中使用一组导入内容的词法范围。Provides information about the lexical scope within which a group of imports are available. 这些信息存储在调试元数据中。This information is stored in debug metadata.

ImportScopeCollection
ImportScopeCollection.Enumerator
ImportScopeHandle
InterfaceImplementation
InterfaceImplementationHandle
InterfaceImplementationHandleCollection
InterfaceImplementationHandleCollection.Enumerator
LocalConstant

提供有关局部常数的信息。Provides information about local constants. 这些信息存储在调试元数据中。This information is stored in debug metadata.

LocalConstantHandle
LocalConstantHandleCollection
LocalConstantHandleCollection.Enumerator
LocalScope

提供有关局部变量和常数范围的信息。Provides information about the scope of local variables and constants. 这些信息存储在调试元数据中。This information is stored in debug metadata.

LocalScopeHandle
LocalScopeHandleCollection
LocalScopeHandleCollection.ChildrenEnumerator
LocalScopeHandleCollection.Enumerator
LocalVariable

提供有关局部变量的信息。Provides information about local variables. 这些信息存储在调试元数据中。This information is stored in debug metadata.

LocalVariableHandle
LocalVariableHandleCollection
LocalVariableHandleCollection.Enumerator
ManifestResource
ManifestResourceHandle
ManifestResourceHandleCollection

表示 ManifestResourceHandle 实例的集合。Represents a collection of ManifestResourceHandle instances.

ManifestResourceHandleCollection.Enumerator
MemberReference
MemberReferenceHandle
MemberReferenceHandleCollection

表示 MemberReferenceHandle 实例的集合。Represents a collection of MemberReferenceHandle instances.

MemberReferenceHandleCollection.Enumerator
MetadataStringComparer

提供字符串比较帮助程序以查询元数据中的字符串,同时尽可能避免分配。Provides string comparison helpers to query strings in metadata while avoiding allocation if possible.

MethodDebugInformation

提供与方法定义关联的调试信息。Provides debug information associated with a method definition. 这些信息存储在调试元数据中。This information is stored in debug metadata.

MethodDebugInformationHandle
MethodDebugInformationHandleCollection
MethodDebugInformationHandleCollection.Enumerator
MethodDefinition
MethodDefinitionHandle
MethodDefinitionHandleCollection
MethodDefinitionHandleCollection.Enumerator
MethodImplementation
MethodImplementationHandle
MethodImplementationHandleCollection
MethodImplementationHandleCollection.Enumerator
MethodImport
MethodSignature<TType>

表示方法(定义、引用或独立)签名或属性签名。Represents a method (definition, reference, or standalone) or property signature. 如果是属性签名,则签名与具有不同 SignatureHeader 的 Getter 的签名相匹配。In the case of properties, the signature matches that of a getter with a distinguishing SignatureHeader.

MethodSpecification
MethodSpecificationHandle
ModuleDefinition
ModuleDefinitionHandle
ModuleReference
ModuleReferenceHandle
NamespaceDefinition
NamespaceDefinitionHandle

提供命名空间定义的句柄。Provides a handle to a namespace definition.

Parameter
ParameterHandle
ParameterHandleCollection

包含指定方法的参数集合。Contains a collection of parameters of a specified method.

ParameterHandleCollection.Enumerator
PropertyAccessors
PropertyDefinition
PropertyDefinitionHandle
PropertyDefinitionHandleCollection
PropertyDefinitionHandleCollection.Enumerator
ReservedBlob<THandle>

表示为将来的内容更新保留的元数据堆上的句柄和相应的 blob。Represents a handle and a corresponding blob on a metadata heap that was reserved for future content update.

SequencePoint
SequencePointCollection
SequencePointCollection.Enumerator
SignatureHeader

表示由签名 Blob 的前导字节指定的签名特征。Represents the signature characteristics specified by the leading byte of signature blobs.

StandaloneSignature
StandaloneSignatureHandle
StringHandle
TypeDefinition
TypeDefinitionHandle
TypeDefinitionHandleCollection

包含一个 TypeDefinitionHandle 实例集合。Contains a collection of TypeDefinitionHandle instances.

TypeDefinitionHandleCollection.Enumerator
TypeLayout
TypeReference
TypeReferenceHandle
TypeReferenceHandleCollection

包含一个 TypeReferenceHandle 实例集合。Contains a collection of TypeReferenceHandle instances.

TypeReferenceHandleCollection.Enumerator
TypeSpecification
TypeSpecificationHandle
UserStringHandle

表示用户字符串堆的句柄。Represents a handle to the user string heap.

接口

IConstructedTypeProvider<TType>
ICustomAttributeTypeProvider<TType>
IPrimitiveTypeProvider<TType>
ISignatureTypeProvider<TType>
ISignatureTypeProvider<TType,TGenericContext>
ISimpleTypeProvider<TType>
ISZArrayTypeProvider<TType>
ITypeProvider<TType>

枚举

ConstantTypeCode

指定值,用于表示元数据常数的类型。Specifies values that represent types of metadata constants.

CustomAttributeNamedArgumentKind

指定常数,用于定义自定义属性签名中参数的种类。Specifies constants that define the kinds of arguments in a custom attribute signature.

ExceptionRegionKind
HandleKind
ILOpCode
ImportDefinitionKind
LocalVariableAttributes
MemberReferenceKind

指定常数,用于指示 MemberReference 引用方法还是字段。Specifies constants that indicate whether a MemberReference references a method or field.

MetadataKind
MetadataReaderOptions
MetadataStreamOptions
PrimitiveSerializationTypeCode

指定常数,用于定义类型代码,这些类型用于编码 CustomAttribute 值 Blob 中基元值的类型。Specifies constants that define the type codes used to encode types of primitive values in a CustomAttribute value blob.

PrimitiveTypeCode

指定常数,用于定义元数据签名中找到的基元类型。Specifies constants that define primitive types found in metadata signatures.

SerializationTypeCode

指定类型代码,用于对 CustomAttributeValue<TType> Blob 中的值类型进行编码。Specifies type codes used to encode the types of values in a CustomAttributeValue<TType> blob.

SignatureAttributes

指定其他可应用于方法签名的标志。 此类型中字段的基础值对应于 SignatureHeader 结构表示的前导签名字节中的表示形式。The underlying values of the fields in this type correspond to the representation in the leading signature byte represented by a SignatureHeader structure.

SignatureCallingConvention

指定给定签名中的参数如何从调用方传递到被调用方。 此类型中字段的基础值对应于 SignatureHeader 结构表示的前导签名字节中的表示形式。The underlying values of the fields in this type correspond to the representation in the leading signature byte represented by a SignatureHeader structure.

SignatureKind

指定签名种类。 此类型中字段的基础值对应于 SignatureHeader 结构表示的前导签名字节中的表示形式。The underlying values of the fields in this type correspond to the representation in the leading signature byte represented by a SignatureHeader structure.

SignatureTypeCode

指定常数,用于定义签名编码中使用的类型代码。Specifies constants that define type codes used in signature encoding.

SignatureTypeKind

指示签名的类型定义。Indicates the type definition of the signature.

StandaloneSignatureKind

指示 StandaloneSignature 是表示独立方法还是局部变量签名。Indicates whether a StandaloneSignature represents a standalone method or local variable signature.