Table of Contents

Interface IVariableDirectoryPath

Namespace
NDepend.Path
Assembly
NDepend.API.dll

Represents a directory path on file system, prefixed with an environment variable.

public interface IVariableDirectoryPath : IDirectoryPath, IVariablePath, IPath
Inherited Members
Extension Methods

Methods (11)

GetBrotherDirectoryWithName(string)

Returns a new directory path containing variables, representing a directory with name directoryName, located in the parent's directory of this directory.

IVariableDirectoryPath GetBrotherDirectoryWithName(string directoryName)

Parameters

directoryName string

The brother directory name.

Returns

IVariableDirectoryPath

Exceptions

InvalidOperationException

This relative directory path doesn't have a parent directory.

GetBrotherFileWithName(string)

Returns a new file path containing variables, representing a file with name fileName, located in the parent's directory of this directory.

IVariableFilePath GetBrotherFileWithName(string fileName)

Parameters

fileName string

The brother file name.

Returns

IVariableFilePath

Exceptions

InvalidOperationException

This relative directory path doesn't have a parent directory.

GetChildDirectoryWithName(string)

Returns a new directory path containing variables, representing a directory with name directoryName, located in this directory.

IVariableDirectoryPath GetChildDirectoryWithName(string directoryName)

Parameters

directoryName string

The child directory name.

Returns

IVariableDirectoryPath

GetChildFileWithName(string)

Returns a new file path containing variables, representing a file with name fileName, located in this directory.

IVariableFilePath GetChildFileWithName(string fileName)

Parameters

fileName string

The child file name.

Returns

IVariableFilePath

TryGetBrotherDirectoryWithName(string, out IVariableDirectoryPath, out string)

Returns true if directoryName doesn't contain forbidden character in path.

bool TryGetBrotherDirectoryWithName(string directoryName, out IVariableDirectoryPath directoryPath, out string failureReason)

Parameters

directoryName string

The brother directory name.

directoryPath IVariableDirectoryPath

The directory path obtained.

failureReason string

The explanation in case this call returns false.

Returns

bool

TryGetBrotherFileWithName(string, out IVariableFilePath, out string)

Returns true if fileName doesn't contain forbidden character in path.

bool TryGetBrotherFileWithName(string fileName, out IVariableFilePath filePath, out string failureReason)

Parameters

fileName string

The brother file name.

filePath IVariableFilePath

The file path obtained.

failureReason string

The explanation in case this call returns false.

Returns

bool

TryGetChildDirectoryWithName(string, out IVariableDirectoryPath, out string)

Returns true if directoryName doesn't contain forbidden character in path.

bool TryGetChildDirectoryWithName(string directoryName, out IVariableDirectoryPath directoryPath, out string failureReason)

Parameters

directoryName string

The child directory name.

directoryPath IVariableDirectoryPath

The directory path obtained.

failureReason string

The explanation in case this call returns false.

Returns

bool

TryGetChildFileWithName(string, out IVariableFilePath, out string)

Returns true if fileName doesn't contain forbidden character in path.

bool TryGetChildFileWithName(string fileName, out IVariableFilePath filePath, out string failureReason)

Parameters

fileName string

The child file name.

filePath IVariableFilePath

The file path obtained.

failureReason string

The explanation in case this call returns false.

Returns

bool

TryResolve(IEnumerable<KeyValuePair<string, string>>, out IAbsoluteDirectoryPath)

Returns VariablePathResolvingStatus.Success if AllVariables of this path can be resolved from variablesValues and the path can be resolved into a drive letter or a UNC absolute directory path.

VariablePathResolvingStatus TryResolve(IEnumerable<KeyValuePair<string, string>> variablesValues, out IAbsoluteDirectoryPath pathDirectoryResolved)

Parameters

variablesValues IEnumerable<KeyValuePair<string, string>>

It is the sequence of pairs [variable name/variable value] used to resolve the path.

pathDirectoryResolved IAbsoluteDirectoryPath

It is the absolute directory path resolved obtained if this method returns VariablePathResolvingStatus.Success.

Returns

VariablePathResolvingStatus

TryResolve(IEnumerable<KeyValuePair<string, string>>, out IAbsoluteDirectoryPath, out IReadOnlyList<string>)

Returns VariablePathResolvingStatus.Success if AllVariables of this path can be resolved from variablesValues and the path can be resolved into a drive letter or a UNC absolute file path.

VariablePathResolvingStatus TryResolve(IEnumerable<KeyValuePair<string, string>> variablesValues, out IAbsoluteDirectoryPath pathDirectoryResolved, out IReadOnlyList<string> unresolvedVariables)

Parameters

variablesValues IEnumerable<KeyValuePair<string, string>>

It is the sequence of pairs [variable name/variable value] used to resolve the path.

pathDirectoryResolved IAbsoluteDirectoryPath

It is the absolute directory path resolved obtained if this method returns VariablePathResolvingStatus.Success.

unresolvedVariables IReadOnlyList<string>

This list contains one or several variables names unresolved, if this method returns VariablePathResolvingStatus.ErrorUnresolvedVariable.

Returns

VariablePathResolvingStatus

TryResolve(IEnumerable<KeyValuePair<string, string>>, out IAbsoluteDirectoryPath, out string)

Returns true if AllVariables of this path can be resolved from variablesValues and the path can be resolved into a drive letter or a UNC absolute directory path.

bool TryResolve(IEnumerable<KeyValuePair<string, string>> variablesValues, out IAbsoluteDirectoryPath pathDirectoryResolved, out string failureReason)

Parameters

variablesValues IEnumerable<KeyValuePair<string, string>>

It is the sequence of pairs [variable name/variable value] used to resolve the path.

pathDirectoryResolved IAbsoluteDirectoryPath

It is the absolute directory path resolved obtained if this method returns true.

failureReason string

If false is returned, failureReason contains the plain english description of the failure.

Returns

bool