# OfficeFormatDescriptor

Describes one concrete Office file format and document kind.

Class 

`OfficeIMO`

**Namespace**

`OfficeIMO`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeFormatDescriptor.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L6)

**Implements**

`IEquatable<OfficeFormatDescriptor>`

**Modifiers**

sealed

Describes one concrete Office file format and document kind.

## Inheritance

- object
- OfficeFormatDescriptor

## Usage

Explore 5 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 2

- Property [OfficeCompatibilityReport.DestinationFormat](/api/core/officeimo-officecompatibilityreport/#property-destinationformat)
- Property [OfficeCompatibilityReport.SourceFormat](/api/core/officeimo-officecompatibilityreport/#property-sourceformat)

### Accepted by parameters 3

- Constructor [OfficeCompatibilityReport.OfficeCompatibilityReport](/api/core/officeimo-officecompatibilityreport/#constructor-ctor-officeimo-officeformatdescriptor-officeimo-officeformatdescriptor-officeimo-officecompatibilitymode-collections-generic-ienumerable-officeimo-officecompatibilityfinding) parameter `destinationFormat`
- Constructor [OfficeCompatibilityReport.OfficeCompatibilityReport](/api/core/officeimo-officecompatibilityreport/#constructor-ctor-officeimo-officeformatdescriptor-officeimo-officeformatdescriptor-officeimo-officecompatibilitymode-collections-generic-ienumerable-officeimo-officecompatibilityfinding) parameter `sourceFormat`
- Method [OfficeFormatDescriptor.Equals](/api/core/officeimo-officeformatdescriptor/#method-equals-officeimo-officeformatdescriptor) parameter `other`

Filter members 

Show inherited

## Constructors

`public OfficeFormatDescriptor(string id, string extension, OfficeDocumentFamily family, OfficeDocumentKind documentKind, OfficeFormatGeneration generation, OfficeFormatEncoding encoding, bool macroEnabled)` [#](#constructor-ctor-string-string-officeimo-officedocumentfamily-officeimo-officedocumentkind-officeimo-officeformatgeneration-officeimo-officeformatencoding-boolean)

[OfficeFormatDescriptor.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L6)

Creates a format descriptor.

Parameters

**id string required**

**extension string required**

**family OfficeIMO.OfficeDocumentFamily required**

**documentKind OfficeIMO.OfficeDocumentKind required**

**generation OfficeIMO.OfficeFormatGeneration required**

**encoding OfficeIMO.OfficeFormatEncoding required**

**macroEnabled bool required**

## Methods

Equals 2 overloads

`public bool Equals(OfficeFormatDescriptor? other)` [#](#method-equals-officeimo-officeformatdescriptor)

[OfficeFormatDescriptor.cs:48](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L48)

Indicates whether the current object is equal to another object of the same type.

Parameters

**other OfficeIMO.OfficeFormatDescriptor? required**

An object to compare with this object.

Returns

`bool` true if the current object is equal to the other parameter; otherwise, false.

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

[OfficeFormatDescriptor.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L53)

Determines whether the specified object is equal to the current object.

Parameters

**obj object? required**

The object to compare with the current object.

Returns

`bool` true if the specified object is equal to the current object; otherwise, false.

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

[OfficeFormatDescriptor.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L58)

Serves as the default hash function.

Returns

`int` A hash code for the current object.

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

[OfficeFormatDescriptor.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L64)

Returns a string that represents the current object.

Returns

`string` A string that represents the current object.

## Inherited Methods

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

Inherited from object

Returns

`Type`

## Properties

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

[OfficeFormatDescriptor.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L27)

Gets the stable format identifier, such as Word.Docx.

`public string Extension { get; }` [#](#property-extension)

[OfficeFormatDescriptor.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L30)

Gets the normalized lower-case extension including its leading period.

`public OfficeDocumentFamily Family { get; }` [#](#property-family)

[OfficeFormatDescriptor.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L33)

Gets the owning Office document family.

`public OfficeDocumentKind DocumentKind { get; }` [#](#property-documentkind)

[OfficeFormatDescriptor.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L36)

Gets the logical document kind.

`public OfficeFormatGeneration Generation { get; }` [#](#property-generation)

[OfficeFormatDescriptor.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L39)

Gets the format generation.

`public OfficeFormatEncoding Encoding { get; }` [#](#property-encoding)

[OfficeFormatDescriptor.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L42)

Gets the physical encoding.

`public bool IsMacroEnabled { get; }` [#](#property-ismacroenabled)

[OfficeFormatDescriptor.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Compatibility/OfficeFormatDescriptor.cs#L45)

Gets whether the format can carry VBA projects.

<!-- PowerForge markdown artifact sha256:B95983165104AA3496452EE7EC12F440AB117EA978DDF0AAB6D68A154469C3FC -->
