internal MetadataReaderErrorMessage( object errorReporter, ILocation location, MetadataReaderErrorKind mrwErrorKind ) { this.errorReporter = errorReporter; this.location = location; this.mrwErrorKind = mrwErrorKind; }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }