public TypeReference Import(TypeReference type) { ModuleDefinition.CheckType(type); if (type.Module == this) { return(type); } return(this.MetadataImporter.ImportType(type, new ImportGenericContext())); }
public TypeReference Import(TypeReference type, IGenericParameterProvider context) { ModuleDefinition.CheckType(type); if (type.Module == this) { return(type); } ModuleDefinition.CheckContext(context, this); return(this.MetadataImporter.ImportType(type, ModuleDefinition.GenericContextFor(context))); }
public TypeReference Import(Type type, IGenericParameterProvider context) { ModuleDefinition.CheckType(type); ModuleDefinition.CheckContext(context, this); return(this.MetadataImporter.ImportType(type, ModuleDefinition.GenericContextFor(context), (context != null ? ImportGenericKind.Open : ImportGenericKind.Definition))); }