# ConfluenceManagedSection

Builds page-body text with a named section delimited by OfficeIMO markers.

Class 

`OfficeIMO.Confluence`

**Namespace**

`OfficeIMO.Confluence`

**Assembly**

`OfficeIMO.Confluence`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[ConfluenceManagedSection.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Confluence/ConfluenceManagedSection.cs#L89)

**Modifiers**

static

Builds page-body text with a named section delimited by OfficeIMO markers.

## Inheritance

- object
- ConfluenceManagedSection

Filter members 

Show inherited

## Methods

`public static ConfluenceManagedSectionResult Apply(string existingBody, string sectionId, string replacement, ConfluenceMissingSectionBehavior missingBehavior = Fail)` [#](#method-apply-string-string-string-officeimo-confluence-confluencemissingsectionbehavior)

[ConfluenceManagedSection.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Confluence/ConfluenceManagedSection.cs#L89)

Replaces a marked section, or appends it when allowed, without contacting Confluence.

Parameters

**existingBody string required**

Current page-body text; a null value is treated as empty.

**sectionId string required**

Marker identifier: 1-100 ASCII letters, digits, dots, underscores, or hyphens.

**replacement string required**

New content between the markers; a null value is treated as empty.

**missingBehavior OfficeIMO.Confluence.ConfluenceMissingSectionBehavior = Fail optional**

Whether to fail or append when both markers are absent.

Returns

`ConfluenceManagedSectionResult` The original and updated bodies, creation flag, and SHA-256 digests.

`public static string EndMarker(string sectionId)` [#](#method-endmarker-string)

[ConfluenceManagedSection.cs:119](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Confluence/ConfluenceManagedSection.cs#L119)

Builds the closing HTML comment marker for a validated section identifier.

Parameters

**sectionId string required**

Returns

`string`

`public static string StartMarker(string sectionId)` [#](#method-startmarker-string)

[ConfluenceManagedSection.cs:117](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Confluence/ConfluenceManagedSection.cs#L117)

Builds the opening HTML comment marker for a validated section identifier.

Parameters

**sectionId string required**

Returns

`string`

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

<!-- PowerForge markdown artifact sha256:13F2D9D9EFC44D5FBD4CE6FA2C3385355AC114ED37677D48D7A36BC2D22C62E1 -->
