# EpubContentEdit

A scoped replacement or deletion guarded by the expected current element.

Class 

`OfficeIMO.Epub`

**Namespace**

`OfficeIMO.Epub`

**Assembly**

`OfficeIMO.Epub`

**Source revision**

`3b680b1b6fb1` with working tree changes

**Source**

[EpubContentEdit.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Epub/Authoring/EpubContentEdit.cs#L8)

**Modifiers**

sealed

A scoped replacement or deletion guarded by the expected current element.

## Inheritance

- object
- EpubContentEdit

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

### Accepted by parameters 1

- Method [EpubPublication.ApplyContentEdits](/api/epub/officeimo-epub-epubpublication/#method-applycontentedits-collections-generic-ienumerable-officeimo-epub-epubcontentedit-threading-cancellationtoken) parameter `edits`

Filter members 

Show inherited

## Constructors

`public EpubContentEdit(string manifestId, string elementId, XElement expected, XElement? replacement)` [#](#constructor-ctor-string-string-xml-linq-xelement-xml-linq-xelement)

[EpubContentEdit.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Epub/Authoring/EpubContentEdit.cs#L8)

Creates an edit. XML is copied; a null replacement deletes the selected element.

Parameters

**manifestId string required**

**elementId string required**

**expected System.Xml.Linq.XElement required**

**replacement System.Xml.Linq.XElement? required**

## 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 ManifestId { get; }` [#](#property-manifestid)

[EpubContentEdit.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Epub/Authoring/EpubContentEdit.cs#L16)

The existing content resource identifier.

`public string ElementId { get; }` [#](#property-elementid)

[EpubContentEdit.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Epub/Authoring/EpubContentEdit.cs#L18)

The existing id or xml:id of the selected element.

`public XElement Expected { get; }` [#](#property-expected)

[EpubContentEdit.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Epub/Authoring/EpubContentEdit.cs#L20)

An independent copy of the expected current element.

`public XElement? Replacement { get; }` [#](#property-replacement)

[EpubContentEdit.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Epub/Authoring/EpubContentEdit.cs#L22)

An independent replacement copy, or null for deletion.

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