# ObjectFlattenerOptions

Configuration for flattening objects into key/value pairs where keys represent dotted paths.

Class 

`OfficeIMO.Data`

**Namespace**

`OfficeIMO.Data`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[ObjectFlattener.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L17)

Configuration for flattening objects into key/value pairs where keys represent dotted paths.

## Inheritance

- object
- ObjectFlattenerOptions

## 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

- Method [ObjectFlattenerOptions.Exclude](/api/core/officeimo-data-objectflatteneroptions/#method-exclude-string)
- Method [ObjectFlattenerOptions.Include](/api/core/officeimo-data-objectflatteneroptions/#method-include-string)
- Method [ObjectFlattenerOptions.Order](/api/core/officeimo-data-objectflatteneroptions/#method-order-string-string-string)
- Method [ObjectFlattenerOptions.PinFirst](/api/core/officeimo-data-objectflatteneroptions/#method-pinfirst-string)
- Method [ObjectFlattenerOptions.PinLast](/api/core/officeimo-data-objectflatteneroptions/#method-pinlast-string)
- Method [ObjectFlattenerOptions.PriorityOrder](/api/core/officeimo-data-objectflatteneroptions/#method-priorityorder-string)

Filter members 

Show inherited

## Constructors

`public ObjectFlattenerOptions()` [#](#constructor-ctor)

[ObjectFlattener.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L17)

## Methods

`public ObjectFlattenerOptions Exclude(params string[] properties)` [#](#method-exclude-string)

[ObjectFlattener.cs:132](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L132)

Appends to [ObjectFlattenerOptions.ExcludeProperties](/api/core/officeimo-data-objectflatteneroptions/) while preserving uniqueness.

Parameters

**properties string[] required**

Returns

`ObjectFlattenerOptions`

`public ObjectFlattenerOptions Include(params string[] properties)` [#](#method-include-string)

[ObjectFlattener.cs:122](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L122)

Appends to [ObjectFlattenerOptions.IncludeProperties](/api/core/officeimo-data-objectflatteneroptions/) while preserving uniqueness.

Parameters

**properties string[] required**

Returns

`ObjectFlattenerOptions`

`public ObjectFlattenerOptions Order(string[]? pinFirst = null, string[]? priority = null, string[]? pinLast = null)` [#](#method-order-string-string-string)

[ObjectFlattener.cs:145](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L145)

One-call convenience: set pin-first, priority order, and pin-last. Any argument may be null; order is applied as PinFirst → PriorityOrder → PinLast.

Parameters

**pinFirst string[]? = null optional**

**priority string[]? = null optional**

**pinLast string[]? = null optional**

Returns

`ObjectFlattenerOptions`

`public ObjectFlattenerOptions PinFirst(params string[] paths)` [#](#method-pinfirst-string)

[ObjectFlattener.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L92)

Adds or appends to [ObjectFlattenerOptions.PinnedFirst](/api/core/officeimo-data-objectflatteneroptions/) while preserving order and uniqueness.

Parameters

**paths string[] required**

Returns

`ObjectFlattenerOptions`

`public ObjectFlattenerOptions PinLast(params string[] paths)` [#](#method-pinlast-string)

[ObjectFlattener.cs:102](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L102)

Adds or appends to [ObjectFlattenerOptions.PinnedLast](/api/core/officeimo-data-objectflatteneroptions/) while preserving order and uniqueness.

Parameters

**paths string[] required**

Returns

`ObjectFlattenerOptions`

`public ObjectFlattenerOptions PriorityOrder(params string[] paths)` [#](#method-priorityorder-string)

[ObjectFlattener.cs:112](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L112)

Sets priority order 1..N for the provided paths (full path or property name).

Parameters

**paths string[] required**

Returns

`ObjectFlattenerOptions`

## 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 List<string> ExpandProperties { get; }` [#](#property-expandproperties)

[ObjectFlattener.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L17)

Property names or dotted paths to expand (descend into) rather than treat as simple values.

`public bool IncludeFullObjects { get; set; }` [#](#property-includefullobjects)

[ObjectFlattener.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L19)

When true, includes the original object under its path in addition to expanded fields.

`public int MaxDepth { get; set; }` [#](#property-maxdepth)

[ObjectFlattener.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L21)

Maximum recursion depth when expanding nested objects.

`public int MaxRows { get; set; }` [#](#property-maxrows)

[ObjectFlattener.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L26)

Maximum number of source or expanded rows a tabular consumer may materialize. The default matches the maximum Excel data rows available below one header row.

`public int MaxColumns { get; set; }` [#](#property-maxcolumns)

[ObjectFlattener.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L28)

Maximum number of projected table columns.

`public long MaxCells { get; set; }` [#](#property-maxcells)

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

Maximum number of projected table cells, including the header row.

`public int MaxCollectionItems { get; set; }` [#](#property-maxcollectionitems)

[ObjectFlattener.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L32)

Maximum number of items enumerated from one nested collection.

`public HeaderCase HeaderCase { get; set; }` [#](#property-headercase)

[ObjectFlattener.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L34)

Header casing strategy for generated column names.

`public string[] HeaderPrefixTrimPaths { get; set; }` [#](#property-headerprefixtrimpaths)

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

Optional prefixes to trim from generated headers.

`public string[]? Columns { get; set; }` [#](#property-columns)

[ObjectFlattener.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L38)

Optional explicit column whitelist (dotted paths).

`public string[] Ignore { get; set; }` [#](#property-ignore)

[ObjectFlattener.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L40)

Paths to exclude from output.

`public string[] IncludeProperties { get; set; }` [#](#property-includeproperties)

[ObjectFlattener.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L46)

Optional include filter using property names or dotted paths. When specified, only matching columns are kept. Unlike [ObjectFlattenerOptions.Columns](/api/core/officeimo-data-objectflatteneroptions/), this filter also matches a dotted path by its last property segment and does not define output order.

`public string[] ExcludeProperties { get; set; }` [#](#property-excludeproperties)

[ObjectFlattener.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L52)

Optional convenience exclude list using property names or dotted paths. A match occurs when the full dotted path matches or the last segment (property name) matches case-insensitively. This augments [ObjectFlattenerOptions.Ignore](/api/core/officeimo-data-objectflatteneroptions/) which treats values as dotted-path prefixes.

`public string[] PinnedFirst { get; set; }` [#](#property-pinnedfirst)

[ObjectFlattener.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L57)

Optional list of dotted paths to pin to the front of the generated column order when [ObjectFlattenerOptions.Columns](/api/core/officeimo-data-objectflatteneroptions/) is not specified. Matching paths keep the specified order; any non-matching paths follow in natural order.

`public string[] PinnedLast { get; set; }` [#](#property-pinnedlast)

[ObjectFlattener.cs:61](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L61)

Optional list of dotted paths to pin to the end of the generated column order. Processed after [ObjectFlattenerOptions.PinnedFirst](/api/core/officeimo-data-objectflatteneroptions/).

`public Dictionary<string, int> PropertyPriority { get; }` [#](#property-propertypriority)

[ObjectFlattener.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L66)

Optional per-column priority ordering. Lower numbers appear earlier. Keys can be dotted paths or property names. When not specified, relative discovery order is preserved. Applied after [ObjectFlattenerOptions.PinnedFirst](/api/core/officeimo-data-objectflatteneroptions/) and before [ObjectFlattenerOptions.PinnedLast](/api/core/officeimo-data-objectflatteneroptions/).

`public NullPolicy NullPolicy { get; set; }` [#](#property-nullpolicy)

[ObjectFlattener.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L68)

How null values are represented.

`public Dictionary<string, object?> DefaultValues { get; }` [#](#property-defaultvalues)

[ObjectFlattener.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L70)

Per‑path default values used when [NullPolicy.DefaultValue](/api/core/officeimo-data-nullpolicy/) is selected.

`public Dictionary<string, Func<object?, object?>> Formatters { get; private set; }` [#](#property-formatters)

[ObjectFlattener.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L72)

Per‑path formatting delegates applied to values.

`public CollectionMode CollectionMode { get; set; }` [#](#property-collectionmode)

[ObjectFlattener.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L74)

How to handle collections.

`public string CollectionJoinWith { get; set; }` [#](#property-collectionjoinwith)

[ObjectFlattener.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L76)

Delimiter used when [CollectionMode.JoinWith](/api/core/officeimo-data-collectionmode/) is selected.

`public string DictionaryEntryJoinWith { get; set; }` [#](#property-dictionaryentryjoinwith)

[ObjectFlattener.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L78)

Delimiter used between entries when a dictionary is rendered as one cell.

`public string DictionaryKeyValueSeparator { get; set; }` [#](#property-dictionarykeyvalueseparator)

[ObjectFlattener.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L80)

Delimiter used between a dictionary key and value when rendered as one cell.

`public Dictionary<string, CollectionColumnMapping> CollectionMapColumns { get; }` [#](#property-collectionmapcolumns)

[ObjectFlattener.cs:87](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L87)

Maps collection paths (e.g., "ScoreBreakdown") to dynamic columns using element properties. Example: map path "ScoreBreakdown" with KeyProperty="Name", ValueProperty="Value" to produce columns like "ScoreBreakdown.HasMX" = 2, "ScoreBreakdown.EffectiveSPFSends" = 2.

## Fields

`public const int DefaultMaxColumns` [#](#field-defaultmaxcolumns)

[ObjectFlattener.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L13)

Default maximum number of projected table columns.

Value: `16384`

`public const long DefaultMaxCells` [#](#field-defaultmaxcells)

[ObjectFlattener.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Data/ObjectFlattener.cs#L15)

Default maximum number of projected table cells, including the header row.

Value: `1000000`

<!-- PowerForge markdown artifact sha256:9E42CE56E84A430E11241808894275C420E01F89F59249FB6137AD917BBEF1EC -->
