Mono.Cecil.MetadataImporter.ImportTypeSpecification C# (CSharp) Method

ImportTypeSpecification() private method

private ImportTypeSpecification ( Type type, ImportGenericContext context ) : TypeReference
type System.Type
context ImportGenericContext
return TypeReference
        TypeReference ImportTypeSpecification(Type type, ImportGenericContext context)
        {
            if (type.IsByRef)
                return new ByReferenceType (ImportType (type.GetElementType (), context));

            if (type.IsPointer)
                return new PointerType (ImportType (type.GetElementType (), context));

            if (type.IsArray)
                return new ArrayType (ImportType (type.GetElementType (), context), type.GetArrayRank ());

            if (type.IsGenericType)
                return ImportGenericInstance (type, context);

            if (type.IsGenericParameter)
                return ImportGenericParameter (type, context);

            throw new NotSupportedException (type.FullName);
        }

Same methods

MetadataImporter::ImportTypeSpecification ( TypeReference type, ImportGenericContext context ) : TypeReference