OfficeTextIntegrityReview
OfficeIMO.Provenance
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[]
Returns
stringpublic 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
- selectedIndices System.Collections.Generic.IEnumerable<int>
Returns
byte[]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
- options OfficeIMO.Provenance.OfficeTextIntegrityOptions? = null
- location string = "Text"
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeTextIntegrityReviewpublic 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[]
- options OfficeIMO.Provenance.OfficeTextIntegrityOptions? = null
- location string = "Text"
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeTextIntegrityReviewpublic 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
- selectedIndices System.Collections.Generic.IEnumerable<int>
Returns
stringInherited Methods
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.