src/Microsoft/Windows/ComponentObjectModel/IO/_Library/Metadata/CustomAttributeTypeProvider.cs
/// <summary>
/// Converts a <see cref="TypeReferenceHandle"/> to a type.
/// </summary>
/// <param name="reader">The <see cref="MetadataReader"/>.</param>
/// <param name="handle">The <see cref="TypeReferenceHandle"/>.</param>
/// <param name="rawTypeKind">The raw type kind.</param>
/// <returns>The converted Type on success. Otherwise, null.</returns>
Converts a  to a type.
Converts a to a type .
public Type GetTypeFromReference( MetadataReader reader, TypeReferenceHandle handle, byte rawTypeKind ) {
            TypeReference typeReference = reader.GetTypeReference( handle );
            string typeNamespace = reader.GetString( typeReference.Namespace );
            string typeName      = reader.GetString( typeReference.Name );
            string fullTypeName  = typeNamespace + "." + typeName;
            if ( true == _referencedTypeMap.TryGetValue( fullTypeName, out Type type ) ) {
                return type;
            }
            return null;
        }
public Type GetTypeFromReference ( MetadataReader reader , TypeReferenceHandle handle , byte rawTypeKind ) { TypeReference typeReference = reader . GetTypeReference ( handle ) ; string typeNamespace = reader . GetString ( typeReference . Namespace ) ; string typeName = reader . GetString ( typeReference . Name ) ; string fullTypeName = typeNamespace + " " + typeName ; if ( true == _referencedTypeMap . TryGetValue ( fullTypeName , out Type type ) ) { return type ; } return null ; }
Converts a  to a type.
Converts a to a type .
// This code does not work with nested types and needs some revision.
The converted Type on success. Otherwise, null.
The converted Type on success . Otherwise null .
reader
MetadataReader
None
handle
TypeReferenceHandle
None
rawTypeKind
byte
The raw type kind.
The raw type kind .