public TypeReference ImportType(TypeReference type, IGenericContext context)
{
if (Mixin.IsTypeSpecification(type))
{
return(ImportTypeSpecification(type, context));
}
var reference = new TypeReference(
type.Namespace,
type.Name,
module,
ImportScope(type.Scope),
type.IsValueType);
MetadataSystem.TryProcessPrimitiveTypeReference(reference);
if (type.IsNested)
{
reference.DeclaringType = ImportType(type.DeclaringType, context);
}
if (type.HasGenericParameters)
{
ImportGenericParameters(reference, type);
}
return(reference);
}