Skip to content

Latest commit

 

History

History
37 lines (19 loc) · 1.87 KB

ii.22.38-typeref-0x01.md

File metadata and controls

37 lines (19 loc) · 1.87 KB

II.22.38 TypeRef: 0x01

The TypeRef table has the following columns:

  • ResolutionScope (an index into a Module, ModuleRef, AssemblyRef or TypeRef table, or null; more precisely, a ResolutionScopeII.24.2.6) coded index)

  • TypeName (an index into the String heap)

  • TypeNamespace (an index into the String heap)

This contains informative text only.

  1. ResolutionScope shall be exactly one of:

    1. null – in this case, there shall be a row in the ExportedType table for this Type – its Implementation field shall contain a File token or an AssemblyRef token that says where the type is defined [ERROR]

    2. a TypeRef token, if this is a nested type (which can be determined by, for example, inspecting the Flags column in its TypeDef table – the accessibility subfield is one of the tdNestedXXX set) [ERROR]

    3. a ModuleRef token, if the target type is defined in another module within the same Assembly as this one [ERROR]

    4. a Module token, if the target type is defined in the current module – this should not occur in a CLI ("compressed metadata") module [WARNING]

    5. an AssemblyRef token, if the target type is defined in a different Assembly from the current module [ERROR]

  2. TypeName shall index a non-empty string in the String heap [ERROR]

  3. TypeNamespace can be null, or non-null

  4. If non-null, TypeNamespace shall index a non-empty string in the String heap [ERROR]

  5. The TypeName string shall be a valid CLS identifier [CLS]

  6. There shall be no duplicate rows, where a duplicate has the same ResolutionScope, TypeName and TypeNamespace [ERROR]

  7. There shall be no duplicate rows, where TypeName and TypeNamespace fields are compared using CLS conflicting-identifier-rules [CLS]

End informative text.