Delen via


VersionControlPath.PrependRootIfNeeded Method (String, PathLength)

Utility method to prepend the root ($/) to a folder - most useful for getting the folder of a team project if you only have his name.

Namespace:  Microsoft.TeamFoundation.VersionControl.Common
Assembly:  Microsoft.TeamFoundation.VersionControl.Common (in Microsoft.TeamFoundation.VersionControl.Common.dll)

Syntax

'Declaration
Public Shared Function PrependRootIfNeeded ( _
    folder As String, _
    maxPathLength As PathLength _
) As String
public static string PrependRootIfNeeded(
    string folder,
    PathLength maxPathLength
)
public:
static String^ PrependRootIfNeeded(
    String^ folder, 
    PathLength maxPathLength
)
static member PrependRootIfNeeded : 
        folder:string * 
        maxPathLength:PathLength -> string
public static function PrependRootIfNeeded(
    folder : String, 
    maxPathLength : PathLength
) : String

Parameters

  • folder
    Type: System.String

    The folder path that may or may not start with $/ already.

Return Value

Type: System.String
The folder path starting with root.

.NET Framework Security

See Also

Reference

VersionControlPath Class

PrependRootIfNeeded Overload

Microsoft.TeamFoundation.VersionControl.Common Namespace