# OfficeTextIntegrityReview

An immutable text review whose selections are bound to the exact reviewed source.

Class 

`OfficeIMO.Provenance`

**Namespace**

`OfficeIMO.Provenance`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

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

**Modifiers**

sealed

An immutable text review whose selections are bound to the exact reviewed source.

## Inheritance

- object
- OfficeTextIntegrityReview

## 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 [OfficeTextIntegrityReview.Inspect](/api/core/officeimo-provenance-officetextintegrityreview/#method-inspect-string-officeimo-provenance-officetextintegrityoptions-string-threading-cancellationtoken)

Filter members 

Show inherited

## Methods

`public static string ComputeSha256(byte[] data)` [#](#method-computesha256-byte)

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

Calculates a lowercase SHA-256 digest of encoded bytes.

Parameters

**data byte[] required**

Returns

`string`

`public byte[] ExportSelected(string currentText, IEnumerable<int> selectedIndices)` [#](#method-exportselected-string-collections-generic-ienumerable-system-int32)

[OfficeTextIntegrityReview.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Provenance/OfficeTextIntegrityReview.cs#L62)

Exports a separate copy in the original encoding, preserving line endings and unselected code points.

Parameters

**currentText string required**

**selectedIndices System.Collections.Generic.IEnumerable<int> required**

Returns

`byte[]`

Inspect 2 overloads

`public static OfficeTextIntegrityReview Inspect(string text, OfficeTextIntegrityOptions? options = null, string location = "Text", CancellationToken cancellationToken = default)` [#](#method-inspect-string-officeimo-provenance-officetextintegrityoptions-string-threading-cancellationtoken)

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

Reviews pasted text. Export uses UTF-8 without a byte-order mark.

Parameters

**text string required**

**options OfficeIMO.Provenance.OfficeTextIntegrityOptions? = null optional**

**location string = "Text" optional**

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

Returns

`OfficeTextIntegrityReview`

`public static OfficeTextIntegrityReview Inspect(byte[] data, OfficeTextIntegrityOptions? options = null, string location = "Text", CancellationToken cancellationToken = default)` [#](#method-inspect-byte-officeimo-provenance-officetextintegrityoptions-string-threading-cancellationtoken)

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

Reviews strict UTF-8 or BOM-declared UTF-16/32, preserving encoding and the original BOM on export.

Parameters

**data byte[] required**

**options OfficeIMO.Provenance.OfficeTextIntegrityOptions? = null optional**

**location string = "Text" optional**

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

Returns

`OfficeTextIntegrityReview`

`public string RemoveSelected(string currentText, IEnumerable<int> selectedIndices)` [#](#method-removeselected-string-collections-generic-ienumerable-system-int32)

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

Removes only selected finding indices after confirming the source still matches. No normalization is applied.

Parameters

**currentText string required**

**selectedIndices System.Collections.Generic.IEnumerable<int> 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?`

## Properties

`public string Text { get; }` [#](#property-text)

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

Exact decoded source; offsets are UTF-16 code units in this string.

`public string TextSha256 { get; }` [#](#property-textsha256)

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

SHA-256 of the exact UTF-16 little-endian code units, without a BOM.

`public string? InputSha256 { get; }` [#](#property-inputsha256)

[OfficeTextIntegrityReview.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Provenance/OfficeTextIntegrityReview.cs#L23)

SHA-256 of the original encoded bytes for a file review; null for pasted text.

`public string EncodingName { get; }` [#](#property-encodingname)

[OfficeTextIntegrityReview.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Provenance/OfficeTextIntegrityReview.cs#L25)

Encoding used when exporting the separate copy.

`public bool HasByteOrderMark { get; }` [#](#property-hasbyteordermark)

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

Whether a source byte-order mark is retained on export.

`public OfficeTextIntegrityReport Report { get; }` [#](#property-report)

[OfficeTextIntegrityReview.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Provenance/OfficeTextIntegrityReview.cs#L29)

Bounded Unicode evidence requiring contextual review.

<!-- PowerForge markdown artifact sha256:611A742DE744CF771584CF601481C98EF3FCAA25E76DAF09A2930EE7E9CE30A1 -->
