SemDiff  1.0.0
Semantic Diffing Tool
SemDiff.Core.Diff Class Reference

This class acts as a more detailed version of the TextChanged class that is better suited for our purposes More...

Public Member Functions

override string ToString ()
 

Static Public Member Functions

static IEnumerable< DiffCompare (SyntaxTree ancestor, SyntaxTree changed)
 Generates Diff results for each change that occurred from the ancestor to the changed More...
 
static bool Intersects (Diff diff1, Diff diff2)
 Determine if the two diffs overlap More...
 
static string VisualDiff (SyntaxTree ancestor, SyntaxTree changed)
 Get a string that represents the differences in the file in a way that is readable More...
 
static string VisualDiff (IEnumerable< Diff > diffs, SyntaxTree ancestor)
 Get a string that represents the differences in the file in a way that is readable More...
 
static bool IntersectsAny (Diff diff, IEnumerable< Diff > diffs)
 Determines if a single diff intersects with any number of other diffs More...
 

Public Attributes

int OffsetEnd => Changed.Span.End - Ancestor.Span.End
 
int OffsetStart => Changed.Span.Start - Ancestor.Span.Start
 

Properties

SpanDetails Ancestor [get, set]
 
SpanDetails Changed [get, set]
 

Detailed Description

This class acts as a more detailed version of the TextChanged class that is better suited for our purposes

Member Function Documentation

static IEnumerable<Diff> SemDiff.Core.Diff.Compare ( SyntaxTree  ancestor,
SyntaxTree  changed 
)
static

Generates Diff results for each change that occurred from the ancestor to the changed

Parameters
ancestorThe abstract syntax tree that the changed version originated from
changedThe abstract syntax tree that resulted from changing the ancestor
Returns
Changes between the ancestor and changed
static bool SemDiff.Core.Diff.Intersects ( Diff  diff1,
Diff  diff2 
)
static

Determine if the two diffs overlap

Parameters
diff1One of the objects to test
diff2One of the objects to test
Returns
true if the diffs overlap else false
static bool SemDiff.Core.Diff.IntersectsAny ( Diff  diff,
IEnumerable< Diff diffs 
)
static

Determines if a single diff intersects with any number of other diffs

Parameters
diffsingle diff that will be compared against many
diffsmultiple diffs that will be compared against a single diff
Returns
true if an intersection occurs else false
static string SemDiff.Core.Diff.VisualDiff ( SyntaxTree  ancestor,
SyntaxTree  changed 
)
static

Get a string that represents the differences in the file in a way that is readable

Parameters
ancestorSyntaxTree that changed was modified from
changedSyntaxTree that contains the changes
Returns
a string that can be inspected to see the changes
static string SemDiff.Core.Diff.VisualDiff ( IEnumerable< Diff diffs,
SyntaxTree  ancestor 
)
static

Get a string that represents the differences in the file in a way that is readable

Parameters
ancestorSyntaxTree that changed was modified from
diffsall the changes to the ancestor
Returns
a string that can be inspected to see the changes

The documentation for this class was generated from the following file: