# OdfDiagnostic

Describes a package, XML, compatibility, or preservation finding.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OdfDiagnostic.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Diagnostics/OdfDiagnostic.cs#L6)

**Modifiers**

sealed

Describes a package, XML, compatibility, or preservation finding.

## Inheritance

- object
- OdfDiagnostic

## Usage

Explore 6 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 6

- Property [OdfDocument.Diagnostics](/api/open-document/officeimo-opendocument-odfdocument/#property-diagnostics)
- Property [OdfValidationResult.Diagnostics](/api/open-document/officeimo-opendocument-odfvalidationresult/#property-diagnostics)
- Property [OdgDocument.Diagnostics](/api/open-document/officeimo-opendocument-odgdocument/#property-diagnostics)
- Property [OdpPresentation.Diagnostics](/api/open-document/officeimo-opendocument-odppresentation/#property-diagnostics)
- Property [OdsDocument.Diagnostics](/api/open-document/officeimo-opendocument-odsdocument/#property-diagnostics)
- Property [OdtDocument.Diagnostics](/api/open-document/officeimo-opendocument-odtdocument/#property-diagnostics)

Filter members 

Show inherited

## Constructors

`public OdfDiagnostic(string id, OdfDiagnosticSeverity severity, string message, string? partPath = null, int? lineNumber = null, int? linePosition = null)` [#](#constructor-ctor-string-officeimo-opendocument-odfdiagnosticseverity-string-string-nullable-system-int32-nullable-system-int32)

[OdfDiagnostic.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Diagnostics/OdfDiagnostic.cs#L6)

Creates a diagnostic.

Parameters

**id string required**

**severity OfficeIMO.OpenDocument.OdfDiagnosticSeverity required**

**message string required**

**partPath string? = null optional**

**lineNumber int? = null optional**

**linePosition int? = null optional**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Id { get; }` [#](#property-id)

[OdfDiagnostic.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Diagnostics/OdfDiagnostic.cs#L16)

Stable diagnostic identifier.

`public OdfDiagnosticSeverity Severity { get; }` [#](#property-severity)

[OdfDiagnostic.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Diagnostics/OdfDiagnostic.cs#L18)

Diagnostic severity.

`public string Message { get; }` [#](#property-message)

[OdfDiagnostic.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Diagnostics/OdfDiagnostic.cs#L20)

Human-readable explanation.

`public string? PartPath { get; }` [#](#property-partpath)

[OdfDiagnostic.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Diagnostics/OdfDiagnostic.cs#L22)

Package part associated with the finding.

`public int? LineNumber { get; }` [#](#property-linenumber)

[OdfDiagnostic.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Diagnostics/OdfDiagnostic.cs#L24)

One-based XML line number when available.

`public int? LinePosition { get; }` [#](#property-lineposition)

[OdfDiagnostic.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Diagnostics/OdfDiagnostic.cs#L26)

One-based XML line position when available.

<!-- PowerForge markdown artifact sha256:6DBA03153FB5F8AACEDF720560EFEBC506239722B23DA9D473734739E1E4AF77 -->
