NDepend.API Documentation
TryDiffSource Method
NDepend.CodeModel Namespace > ExtensionMethodsTooling Class : TryDiffSource Method
The code element to open the source from
The compare context from which we can get the older version of the codeElement.
If false is returned, contains the plain-english description of the failure.
Opens with a textual files compare/diff tool, the older and newer source versions of codeElement.
Syntax

Parameters

codeElement
The code element to open the source from
compareContext
The compare context from which we can get the older version of the codeElement.
failureReason
If false is returned, contains the plain-english description of the failure.
Remarks
If source files get zipped at analysis time, the older source file version is this zipped version.
The textual files compare/diff tool is defined through: NDepend > Options panel > Build Comparison > Sources Files Compare Tool.
If codeElement has more than one ICodeElement.SourceDecls, this method fails. In this situation you can use instead the method TryCompareSourceWith(ISourceDecl,ISourceDecl) to compare source files older/newer versions one by one.
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
ICompareContext Interface
CreateCompareContextWithOlder Method
ExtensionMethodsCQLinqCompare Class
RelyOnCompareContext Property
Compile(String,ICompareContext) Method
CompileMany(IEnumerable<String>,ICompareContext) Method
TryCompareSourceWith(ISourceDecl,ISourceDecl) Method