Example #1
0
 public TypeReference Import(TypeReference type)
 {
     ModuleDefinition.CheckType(type);
     if (type.Module == this)
     {
         return(type);
     }
     return(this.MetadataImporter.ImportType(type, new ImportGenericContext()));
 }
Example #2
0
 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)));
 }
Example #3
0
 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)));
 }