# IWorkNativeEditSession

Edits a captured native source without changing the immutable source model.

Class 

`OfficeIMO.IWork`

**Namespace**

`OfficeIMO.IWork`

**Assembly**

`OfficeIMO.IWork`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[IWorkNativeEditSession.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.cs#L22)

**Implements**

`IDisposable`

**Modifiers**

sealed

Edits a captured native source without changing the immutable source model.

## Inheritance

- object
- IWorkNativeEditSession

## Remarks

Instances are not thread safe. Supported mutations are direct Keynote image moves/resizes and existing Numbers numeric/boolean cells and fixed-length plain Pages body or direct Keynote text-box paragraphs in bounded modern profiles. Nested-index mutations are rejected. Unchanged saves support all modern read profiles.

## Usage

Explore 1 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 1

- Method [IWorkSourceDocument.BeginEdit](/api/iwork/officeimo-iwork-iworksourcedocument/#method-beginedit)

Filter members 

Show inherited

## Methods

`public void Dispose()` [#](#method-dispose)

[IWorkSourceDocument.Lifecycle.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/IWorkSourceDocument.Lifecycle.cs#L21)

Completes the managed editing lifetime without disposing its independently owned source snapshot.

`public void MoveKeynoteImage(IWorkObjectIdentity identity, float leftPoints, float topPoints, CancellationToken cancellationToken = default)` [#](#method-movekeynoteimage-officeimo-iwork-iworkobjectidentity-single-single-threading-cancellationtoken)

[IWorkNativeEditSession.KeynoteImages.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.KeynoteImages.cs#L11)

Moves a direct, unlocked, unrotated and unmasked Keynote image within its slide canvas.

Parameters

**identity OfficeIMO.IWork.IWorkObjectIdentity required**

**leftPoints float required**

**topPoints float required**

**cancellationToken System.Threading.CancellationToken = default optional**

`public void ResizeKeynoteImage(IWorkObjectIdentity identity, float widthPoints, float heightPoints, CancellationToken cancellationToken = default)` [#](#method-resizekeynoteimage-officeimo-iwork-iworkobjectidentity-single-single-threading-cancellationtoken)

[IWorkNativeEditSession.KeynoteImages.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.KeynoteImages.cs#L26)

Resizes a direct, unlocked, unrotated and unmasked Keynote image within its slide canvas.

Parameters

**identity OfficeIMO.IWork.IWorkObjectIdentity required**

**widthPoints float required**

**heightPoints float required**

**cancellationToken System.Threading.CancellationToken = default optional**

Save 3 overloads

`public IWorkNativeSaveReport Save(Stream destination, IWorkNativeSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-save-io-stream-officeimo-iwork-iworknativesaveoptions-threading-cancellationtoken)

[IWorkNativeEditSession.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.cs#L34)

Writes a completed package at the caller stream's current position, leaves it open and returns the report.

Parameters

**destination System.IO.Stream required**

**options OfficeIMO.IWork.IWorkNativeSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`IWorkNativeSaveReport`

`public IWorkNativeSaveReport Save(string path, bool overwrite = false, IWorkNativeSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-save-string-boolean-officeimo-iwork-iworknativesaveoptions-threading-cancellationtoken)

[IWorkNativeEditSession.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.cs#L44)

Atomically publishes a native ZIP package. Existing destinations require explicit overwrite.

Parameters

**path string required**

**overwrite bool = false optional**

**options OfficeIMO.IWork.IWorkNativeSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`IWorkNativeSaveReport`

`public IWorkNativeSaveReport Save(bool overwrite = false, IWorkNativeSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-save-boolean-officeimo-iwork-iworknativesaveoptions-threading-cancellationtoken)

[IWorkSourceDocument.Lifecycle.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/IWorkSourceDocument.Lifecycle.cs#L18)

Saves to the associated path, preserving explicit overwrite and source-directory containment rules.

Parameters

**overwrite bool = false optional**

**options OfficeIMO.IWork.IWorkNativeSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`IWorkNativeSaveReport`

`public void SetKeynoteTextBoxParagraphText(IWorkObjectIdentity textBoxIdentity, int paragraph, string text, CancellationToken cancellationToken = default)` [#](#method-setkeynotetextboxparagraphtext-officeimo-iwork-iworkobjectidentity-int32-string-threading-cancellationtoken)

[IWorkNativeEditSession.KeynoteText.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.KeynoteText.cs#L14)

Replaces one plain paragraph in a direct Keynote text box without moving native offsets.

Parameters

**textBoxIdentity OfficeIMO.IWork.IWorkObjectIdentity required**

**paragraph int required**

**text string required**

**cancellationToken System.Threading.CancellationToken = default optional**

`public void SetNumbersCellBoolean(IWorkObjectIdentity tableIdentity, int row, int column, bool value, CancellationToken cancellationToken = default)` [#](#method-setnumberscellboolean-officeimo-iwork-iworkobjectidentity-int32-int32-boolean-threading-cancellationtoken)

[IWorkNativeEditSession.NumbersCells.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.NumbersCells.cs#L22)

Replaces an existing boolean Numbers cell while preserving its native type, styles and identities.

Parameters

**tableIdentity OfficeIMO.IWork.IWorkObjectIdentity required**

**row int required**

**column int required**

**value bool required**

**cancellationToken System.Threading.CancellationToken = default optional**

`public void SetNumbersCellNumber(IWorkObjectIdentity tableIdentity, int row, int column, double value, CancellationToken cancellationToken = default)` [#](#method-setnumberscellnumber-officeimo-iwork-iworkobjectidentity-int32-int32-double-threading-cancellationtoken)

[IWorkNativeEditSession.NumbersCells.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.NumbersCells.cs#L12)

Replaces an existing numeric Numbers cell without changing its native type, styles or identities.

Parameters

**tableIdentity OfficeIMO.IWork.IWorkObjectIdentity required**

**row int required**

**column int required**

**value double required**

**cancellationToken System.Threading.CancellationToken = default optional**

`public void SetPagesBodyParagraphText(IWorkObjectIdentity bodyIdentity, int paragraph, string text, CancellationToken cancellationToken = default)` [#](#method-setpagesbodyparagraphtext-officeimo-iwork-iworkobjectidentity-int32-string-threading-cancellationtoken)

[IWorkNativeEditSession.PagesText.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.PagesText.cs#L14)

Replaces one uniform body paragraph while preserving its native text and byte offsets.

Parameters

**bodyIdentity OfficeIMO.IWork.IWorkObjectIdentity required**

**paragraph int required**

**text string required**

**cancellationToken System.Threading.CancellationToken = default optional**

ToBytes 2 overloads

`public byte[] ToBytes(IWorkNativeSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-tobytes-officeimo-iwork-iworknativesaveoptions-threading-cancellationtoken)

[IWorkNativeEditSession.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.cs#L22)

Encodes a native ZIP package, preserving all unmodified captured entry payloads.

Parameters

**options OfficeIMO.IWork.IWorkNativeSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`byte[]`

`public byte[] ToBytes(out IWorkNativeSaveReport report, IWorkNativeSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-tobytes-officeimo-iwork-iworknativesavereport-officeimo-iwork-iworknativesaveoptions-threading-cancellationtoken)

[IWorkNativeEditSession.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.cs#L26)

Encodes a native ZIP package and returns its actual operation-level preservation evidence.

Parameters

**report OfficeIMO.IWork.IWorkNativeSaveReport required**

**options OfficeIMO.IWork.IWorkNativeSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`byte[]`

## 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 IWorkSourceDocument Source { get; }` [#](#property-source)

[IWorkNativeEditSession.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/Editing/IWorkNativeEditSession.cs#L18)

Gets the immutable source snapshot used by this edit session.

`public string? FilePath { get; private set; }` [#](#property-filepath)

[IWorkSourceDocument.Lifecycle.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.IWork/IWorkSourceDocument.Lifecycle.cs#L14)

Gets the last successful output path, falling back to the captured source file.

<!-- PowerForge markdown artifact sha256:10B1B39743728CB3023D95D099E621B351EE616AB4997245B213788865440AD0 -->
