Class TextFinder
A utility class for finding and replacing text in a Word document.
Inherited Members
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 |