예제 #1
0
 /// <summary>
 /// Returns true if the field should be imported. Visibility
 /// and the value of <paramref name="importOptions"/> are considered
 /// </summary>
 public static bool ShouldImportField(this PEModule module, FieldDefinitionHandle field, MetadataImportOptions importOptions)
 {
     try
     {
         var flags = module.GetFieldDefFlagsOrThrow(field);
         return(ShouldImportField(flags, importOptions));
     }
     catch (BadImageFormatException)
     {
         return(true);
     }
 }