Comparer

Comparer class

Represents main class that controls the documents comparison process.

public class Comparer : IDisposable

Constructors

Name Description
Comparer(Stream) Initializes new instance of Comparer class with source document stream.
Comparer(string) Initializes new instance of Comparer class with source file path.
Comparer(Stream, ComparerSettings) Initializes new instance of Comparer class with source document stream and ComparerSettings.
Comparer(Stream, LoadOptions) Initializes new instance of Comparer with source document stream and LoadOptions.
Comparer(string, CompareOptions) Initializes new instance of Comparer with source folder path and CompareOptions.
Comparer(string, ComparerSettings) Initializes new instance of Comparer class with source file path and ComparerSettings.
Comparer(string, LoadOptions) Initializes new instance of Comparer with source file path and LoadOptions.
Comparer(Stream, LoadOptions, ComparerSettings) Initializes new instance of Comparer class with document stream, LoadOptions and ComparerSettings.
Comparer(string, LoadOptions, ComparerSettings) Initializes new instance of Comparer class with source file path, LoadOptions and ComparerSettings.

Properties

Name Description
Result { get; } Result document.
Source { get; } Source file that is being compared.
sourceFolder { get; } Source folder that is being compared.
targetFolder { get; set; } Target folder that is being compared.
Targets { get; } List of target files to compare with source file.

Methods

Name Description
Add(Stream) Adds document stream to comparison.
Add(string) Adds file to comparison.
Add(Stream, LoadOptions) Adds document stream to comparison with loading options specified.
Add(string, CompareOptions) Adds folder to comparison.
Add(string, LoadOptions) Adds file to comparison with loading options specified.
ApplyChanges(Stream, ApplyChangeOptions) Accepts or rejects changes and applies them to resultant document.
ApplyChanges(string, ApplyChangeOptions) Accepts or rejects changes and applies them to resultant document.
ApplyChanges(Stream, SaveOptions, ApplyChangeOptions) Accepts or rejects changes and applies them to resultant document.
ApplyChanges(string, SaveOptions, ApplyChangeOptions) Accepts or rejects changes and applies them to resultant document.
Compare() Compares documents without saving result with default options
Compare(CompareOptions) Compares documents without saving result.
Compare(Stream) Compares documents and saves result to file stream
Compare(string) Compares documents and saves result to file path
Compare(SaveOptions, CompareOptions) Compares documents without saving result.
Compare(Stream, CompareOptions) Compares documents and saves result to file stream
Compare(Stream, SaveOptions) Compares documents and save result to file stream
Compare(string, CompareOptions) Compares documents and saves result to file path
Compare(string, SaveOptions) Compares documents and save result to file path
Compare(Stream, SaveOptions, CompareOptions) Compares documents and saves result to a stream.
Compare(string, SaveOptions, CompareOptions) Compares documents and saves result to file path
CompareDirectory(string, CompareOptions) Compares directory and saves result to file path
Dispose() Releases resources.
GetChanges() Gets list of changes between source and target file(s).
GetChanges(GetChangeOptions) Gets list of changes between source and target file(s).
GetResultDocumentStream() Gets the stream of result document, returns null if stream does not exist
GetResultString() Get result string after comparison (For Text Comparison only).

See Also