Esempio n. 1
0
 internal MetadataReaderErrorMessage(
     object errorReporter,
     ILocation location,
     MetadataReaderErrorKind mrwErrorKind
     )
 {
     this.errorReporter = errorReporter;
     this.location      = location;
     this.mrwErrorKind  = mrwErrorKind;
 }
Esempio n. 2
0
 internal void AddBinaryError(
     uint offset,
     MetadataReaderErrorKind errorKind
     )
 {
     foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind))
     {
         IBinaryLocation /*?*/ binaryLocation = errMessage.Location as IBinaryLocation;
         if (binaryLocation == null)
         {
             continue;
         }
         if (binaryLocation.Offset == offset)
         {
             return;
         }
     }
     this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new BinaryLocation(this.BinaryDocument, offset), errorKind));
 }
Esempio n. 3
0
 internal void AddILError(
     IMethodDefinition methodDefinition,
     uint offset,
     MetadataReaderErrorKind errorKind
     )
 {
     foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind))
     {
         IILLocation /*?*/ ilLocation = errMessage.Location as IILLocation;
         if (ilLocation == null)
         {
             continue;
         }
         if (ilLocation.Offset == offset && ilLocation.MethodDefinition.Equals(methodDefinition))
         {
             return;
         }
     }
     this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new ILLocation(this.BinaryDocument, methodDefinition, offset), errorKind));
 }
Esempio n. 4
0
 internal void AddMetadataError(
     TableIndices tableIndex,
     uint rowId,
     MetadataReaderErrorKind errorKind
     )
 {
     foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind))
     {
         MetadataLocation /*?*/ mdLocation = errMessage.Location as MetadataLocation;
         if (mdLocation == null)
         {
             continue;
         }
         if (mdLocation.rowId == rowId && mdLocation.tableIndex == tableIndex)
         {
             return;
         }
     }
     this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new MetadataLocation(this.BinaryDocument, tableIndex, rowId), errorKind));
 }
Esempio n. 5
0
 internal void AddMetadataStreamError(
     string streamName,
     uint offset,
     MetadataReaderErrorKind errorKind
     )
 {
     foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind))
     {
         MetadataStreamLocation /*?*/ mdStreamLocation = errMessage.Location as MetadataStreamLocation;
         if (mdStreamLocation == null)
         {
             continue;
         }
         if (mdStreamLocation.offset == offset && mdStreamLocation.streamName.Equals(streamName))
         {
             return;
         }
     }
     this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new MetadataStreamLocation(this.BinaryDocument, streamName, offset), errorKind));
 }
Esempio n. 6
0
 internal void AddDirectoryError(
     Directories directory,
     uint offset,
     MetadataReaderErrorKind errorKind
     )
 {
     foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind))
     {
         DirectoryLocation /*?*/ directoryLocation = errMessage.Location as DirectoryLocation;
         if (directoryLocation == null)
         {
             continue;
         }
         if (directoryLocation.offset == offset && directoryLocation.directory == directory)
         {
             return;
         }
     }
     this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new DirectoryLocation(this.BinaryDocument, directory, offset), errorKind));
 }
Esempio n. 7
0
     internal MetadataReaderErrorMessage(
   object errorReporter,
   ILocation location,
   MetadataReaderErrorKind mrwErrorKind
 )
     {
         this.errorReporter = errorReporter;
           this.location = location;
           this.mrwErrorKind = mrwErrorKind;
     }
Esempio n. 8
0
     internal void AddMetadataStreamError(
   string streamName,
   uint offset,
   MetadataReaderErrorKind errorKind
 )
     {
         foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind)) {
         MetadataStreamLocation/*?*/ mdStreamLocation = errMessage.Location as MetadataStreamLocation;
         if (mdStreamLocation == null) {
           continue;
         }
         if (mdStreamLocation.offset == offset && mdStreamLocation.streamName.Equals(streamName)) {
           return;
         }
           }
           this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new MetadataStreamLocation(this.BinaryDocument, streamName, offset), errorKind));
     }
Esempio n. 9
0
     internal void AddMetadataError(
   TableIndices tableIndex,
   uint rowId,
   MetadataReaderErrorKind errorKind
 )
     {
         foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind)) {
         MetadataLocation/*?*/ mdLocation = errMessage.Location as MetadataLocation;
         if (mdLocation == null) {
           continue;
         }
         if (mdLocation.rowId == rowId && mdLocation.tableIndex == tableIndex) {
           return;
         }
           }
           this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new MetadataLocation(this.BinaryDocument, tableIndex, rowId), errorKind));
     }
Esempio n. 10
0
     internal void AddILError(
   IMethodDefinition methodDefinition,
   uint offset,
   MetadataReaderErrorKind errorKind
 )
     {
         foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind)) {
         IILLocation/*?*/ ilLocation = errMessage.Location as IILLocation;
         if (ilLocation == null) {
           continue;
         }
         if (ilLocation.Offset == offset && ilLocation.MethodDefinition.Equals(methodDefinition)) {
           return;
         }
           }
           this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new ILLocation(this.BinaryDocument, methodDefinition, offset), errorKind));
     }
Esempio n. 11
0
     internal void AddDirectoryError(
   Directories directory,
   uint offset,
   MetadataReaderErrorKind errorKind
 )
     {
         foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind)) {
         DirectoryLocation/*?*/ directoryLocation = errMessage.Location as DirectoryLocation;
         if (directoryLocation == null) {
           continue;
         }
         if (directoryLocation.offset == offset && directoryLocation.directory == directory) {
           return;
         }
           }
           this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new DirectoryLocation(this.BinaryDocument, directory, offset), errorKind));
     }
Esempio n. 12
0
     internal void AddBinaryError(
   uint offset,
   MetadataReaderErrorKind errorKind
 )
     {
         foreach (MetadataReaderErrorMessage errMessage in this.ErrorList.GetValuesFor((uint)errorKind)) {
         IBinaryLocation/*?*/ binaryLocation = errMessage.Location as IBinaryLocation;
         if (binaryLocation == null) {
           continue;
         }
         if (binaryLocation.Offset == offset) {
           return;
         }
           }
           this.AddMetadataReaderErrorMessage(new MetadataReaderErrorMessage(this.MetadataReader.ErrorsReporter, new BinaryLocation(this.BinaryDocument, offset), errorKind));
     }