NDepend.API Documentation
TryAdd Method (IProjectGraphFiles)
NDepend.Project Namespace > IProjectGraphFiles Interface : TryAdd Method
The graph file path.
Add a graph file referenced by this project.
Syntax

Parameters

filePath
The graph file path.

Return Value

false if there is already a graph file referenced by this project, with IGraphFileRef.IGraphFileRef.Path equals to filePath else the graph file gets added and the method returns true.
Remarks
If this method adds a graph file, the event IProject.IProject.SettingsChanged is triggered with the flag ProjectSettings.ProjectSettings.GraphFilesRef_Paths activated.
Requirements

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

See Also

Reference

IProjectGraphFiles Interface
IProjectGraphFiles Members