A record of one deviation from the specification found while reading a file, and what was done about it.
public sealed class Diagnostic
In lenient mode a reader repairs what it can and records a diagnostic on the document; in strict mode the first Warning or Error is thrown as a DiagnosticException. A well-formed file produces no warnings and no errors: one means a "shall" of ISO 32000-2 was violated or the reader changed what it read, never that a "should" was not followed. Information notes a valid feature the library preserves without supporting it, and is never thrown.
Codes are stable PascalCase identifiers, such as StreamLengthInvalid or PageTreeCountMismatch; match on
Code, Offset and ObjectReference, never on Message. A document records each
repair once: the same code at the same offset in the same object is not recorded twice, however often it is met.
ISO 32000-2 §7.5 describes the file structure a reader repairs (cross-reference table, trailer, startxref) but does not
specify repair; the codes for it are StartxrefMissing, StartxrefInvalid, TrailerMissing,
RootMissing, XrefEntryOffsetInvalid, MissingEndobj and StreamLengthInvalid, among others.
kind:method, kind:property, kind:ctor. Press Esc to clear.Diagnostic(String, DiagnosticSeverity, String, Nullable<Int64>, CosReference?)Initializes a new instance of the Diagnostic class.CodeGets the stable identifier of the kind of deviation.MessageGets a human-readable description of the deviation and the repair.ObjectReferenceGets the indirect object the deviation is in, or null when unknown or not in an object.OffsetGets the byte offset from the start of the file where the deviation was found, or null when unknown.SeverityGets how much the repair may have changed the document.