Show / Hide Table of Contents

Class RangeSnapshot

Represents a cached, COM-free fingerprint of a Word.Range. Supports fast hash comparisons and optional slow fallbacks.

Inheritance
object
RangeSnapshot
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: CoverageKiller2.DOM
Assembly: CoverageKiller2.dll
Syntax
public class RangeSnapshot
Remarks

Version: CK2.00.02.0001

Constructors

RangeSnapshot(Range)

Declaration
public RangeSnapshot(Range range)
Parameters
Type Name Description
Range range

Properties

Alignment

Declaration
public WdParagraphAlignment Alignment { get; }
Property Value
Type Description
WdParagraphAlignment

FastHash

Declaration
public string FastHash { get; }
Property Value
Type Description
string

FieldCount

Declaration
public int FieldCount { get; }
Property Value
Type Description
int

FontName

Declaration
public string FontName { get; }
Property Value
Type Description
string

FontSize

Declaration
public float FontSize { get; }
Property Value
Type Description
float

TableCount

Declaration
public int TableCount { get; }
Property Value
Type Description
int

TextPreview

Declaration
public string TextPreview { get; }
Property Value
Type Description
string

Methods

FastMatch(RangeSnapshot)

Fast comparison using only precomputed hash values.

Declaration
public bool FastMatch(RangeSnapshot other)
Parameters
Type Name Description
RangeSnapshot other
Returns
Type Description
bool

FastMatch(RangeSnapshot, RangeSnapshot)

Static form of FastMatch that compares two existing snapshots. No COM access.

Declaration
public static bool FastMatch(RangeSnapshot a, RangeSnapshot b)
Parameters
Type Name Description
RangeSnapshot a
RangeSnapshot b
Returns
Type Description
bool

Match(CKRange)

Uses the cached snapshot from a CKRange and falls back to SlowMatch if unavailable.

Declaration
public bool Match(CKRange range)
Parameters
Type Name Description
CKRange range
Returns
Type Description
bool

Match(CKRange, CKRange)

Static form of Match that compares two CKRanges, using snapshot fastmatch with fallback.

Declaration
public static bool Match(CKRange a, CKRange b)
Parameters
Type Name Description
CKRange a
CKRange b
Returns
Type Description
bool

Match(RangeSnapshot, CKRange)

Static form of Match that compares a snapshot against a CKRange, falling back if needed.

Declaration
public static bool Match(RangeSnapshot a, CKRange b)
Parameters
Type Name Description
RangeSnapshot a
CKRange b
Returns
Type Description
bool

SlowMatch(Range)

Builds a new snapshot from the given Word.Range and compares hashes. Accepts COM access.

Declaration
public bool SlowMatch(Range other)
Parameters
Type Name Description
Range other
Returns
Type Description
bool

SlowMatch(Range, Range)

Static form of SlowMatch that builds snapshots from Word.Range objects. Uses COM.

Declaration
public static bool SlowMatch(Range a, Range b)
Parameters
Type Name Description
Range a
Range b
Returns
Type Description
bool

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Extension Methods

PingService.PingPong<T>(T, string)
PingService.PingPong<T>(T, string, string)
PingService.PingPong<T, TResult>(T, Func<TResult>, string, string)
PingService.Ping<T>(T, string)
PingService.Ping<T>(T, string, string)
PingService.Ping<T>(T, Type[], string)
PingService.Pong<T>(T, string)
PingService.Pong<T>(T, string, string)
PingService.Pong<T>(T, Type, string)
PingService.Pong<T>(T, Type[], string)
PingService.Pong<T, TResult>(T, Func<TResult>, string, string)
In this article
Back to top Generated by DocFX