ComparerContext Class

Wordize.Comparing.ComparerContext class. Document comparer context

ComparerContext class

Document comparer context

public class ComparerContext : ProcessorContext

Constructors

NameDescription
ComparerContext()The default constructor.

Properties

NameDescription
AcceptRevisions { get; set; }Indicates whether to accept revisions in the documents before comparing them. If the compared documents contain revisions and this flag is set to false, the processor will reject revisions. Default is true.
Author { get; set; }The author to be assigned to revisions created during document comparison.
CompareOptions { get; }Options used upon comparing documents.
DateTime { get; set; }The date and time assigned to revisions created during document comparison.
FontSettings { get; set; }Allows to specify document font settings.
LayoutOptions { get; }Document layout options used by the processor.
WarningCallback { get; set; }Warning callback used by the processor.

Examples

Demonstrates how to compare two documents using the Fluent API with customized CompareOptions.

ComparerContext context = new ComparerContext();
context.Author = "Wordize";
context.DateTime = DateTime.Now;
context.CompareOptions.IgnoreFormatting = true;

Comparer.Create(context)
    .From(MyDir + "CompareV1.docx")
    .From(MyDir + "CompareV2.docx")
    .To(ArtifactsDir + "CompareFluentAPI.docx")
    .Execute();

See Also