Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeTextIntegrityReview

OfficeIMO.Provenance

Namespace
OfficeIMO.Provenance
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
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

Methods

public static string ComputeSha256(byte[] data) #

Calculates a lowercase SHA-256 digest of encoded bytes.

Parameters

data byte[] required

Returns

string
public byte[] ExportSelected(string currentText, IEnumerable<int> selectedIndices) #

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

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
public static OfficeTextIntegrityReview Inspect(byte[] data, OfficeTextIntegrityOptions? options = null, string location = "Text", CancellationToken cancellationToken = default) #

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
public string RemoveSelected(string currentText, IEnumerable<int> selectedIndices) #

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

Properties

public string Text { get; } #

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

public string TextSha256 { get; } #

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

public string? InputSha256 { get; } #

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

public string EncodingName { get; } #

Encoding used when exporting the separate copy.

public bool HasByteOrderMark { get; } #

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

public OfficeTextIntegrityReport Report { get; } #

Bounded Unicode evidence requiring contextual review.