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