Show / Hide Table of Contents

Class TextFinder

A utility class for finding and replacing text in a Word document.

Inheritance
object
TextFinder
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: CoverageKiller2.Pipeline.WordHelpers
Assembly: CoverageKiller2.dll
Syntax
public class TextFinder

Constructors

TextFinder(CKDocument, string)

Initializes a new instance of the TextFinder class with a specified CKDocument and search text.

Declaration
public TextFinder(CKDocument ckDoc, string searchText)
Parameters
Type Name Description
CKDocument ckDoc

The CKDocument object that contains the Word document.

string searchText

The text to search for in the document.

TextFinder(CKDocument, string, CKRange)

Initializes a new instance of the TextFinder class with a specified CKDocument, search text, and a range to search within.

Declaration
public TextFinder(CKDocument ckDoc, string searchText, CKRange searchWithinRange = null)
Parameters
Type Name Description
CKDocument ckDoc

The CKDocument object that contains the Word document.

string searchText

The text to search for in the document.

CKRange searchWithinRange

The range to search within. If null, the entire document will be searched.

Fields

Tracer

Declaration
public Tracer Tracer
Field Value
Type Description
Tracer

Properties

SearchText

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

TextFound

Gets a value indicating whether the text was found in the current range.

Declaration
public bool TextFound { get; }
Property Value
Type Description
bool

Methods

Replace(string)

Declaration
public void Replace(string replaceText)
Parameters
Type Name Description
string replaceText

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