NDepend.API Documentation
TryAdd Method (IProjectPathVariables)
NDepend.Project Namespace > IProjectPathVariables Interface : TryAdd Method
The path variable name.
The path variable value.
Try add a path variable to this project collection of path variables.
Syntax

Parameters

pathVariableName
The path variable name.
pathVariableValue
The path variable value.
Remarks
Returns false if pathVariableName is NdProjectDir or NdProjectOutputDir.
Returns false if a variable with pathVariableName already exists.
If this method modifies a state, this method returns true and the event IProject.IProject.SettingsChanged is triggered with the flag ProjectSettings.ProjectSettings.PathVariables activated.
Requirements

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

See Also

Reference

IProjectPathVariables Interface
IProjectPathVariables Members