NDepend.API Documentation
TryCompareSourceWith(ISourceDecl,ISourceDecl) Method
NDepend.CodeModel Namespace > ExtensionMethodsTooling Class > TryCompareSourceWith Method : TryCompareSourceWith(ISourceDecl,ISourceDecl) Method
The first line position in a source file.
The second line position in a source file.
Opens with a textual files compare/diff tool, two source files declarations, this sourceDecl and sourceDeclOther.
Syntax
[Extension()]
public static bool TryCompareSourceWith( 
   ISourceDecl sourceDecl,
   ISourceDecl sourceDeclOther
)

Parameters

sourceDecl
The first line position in a source file.
sourceDeclOther
The second line position in a source file.

Return Value

true if the two source declarations were compared successfully.
Remarks
sourceDecl and sourceDeclOther can be obtained through ICodeElement.ICodeElement.SourceDecls.
The textual files compare/diff tool is defined through: NDepend > Options panel > Build Comparison > Sources Files Compare Tool
This method can only be invoked within a .NET Framework 4.x and Windows OS context else it throws a NotSupportedException.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsTooling Class
ExtensionMethodsTooling Members
Overload List
ICompareContext Interface
CreateCompareContextWithOlder Method
ExtensionMethodsCQLinqCompare Class
RelyOnCompareContext Property
Compile(String,ICompareContext) Method
CompileMany(IEnumerable<String>,ICompareContext) Method