WorkspaceSpec.SanitizeProposedName Method

Given a proposed name for a shelveset or workspace, truncates it at the maximum length for shelveset and workspace names, and removes invalid characters.

Name validation is enforced by the server. The sanitization process for cleaning up a name is current as of the version of this object model.

While unlikely, it is possible that if this method is used with a future version of esprtfs, that the name generated may not be valid due to a change in the rules for workspace and shelveset names.

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

Syntax

'Declaration
Public Shared Function SanitizeProposedName ( _
    proposedName As String _
) As String
public static string SanitizeProposedName(
    string proposedName
)
public:
static String^ SanitizeProposedName(
    String^ proposedName
)
static member SanitizeProposedName : 
        proposedName:string -> string
public static function SanitizeProposedName(
    proposedName : String
) : String

Parameters

  • proposedName
    Type: System.String

    Proposed name for the workspace or shelveset.

Return Value

Type: System.String
A sanitized name for the workspace or shelveset.

.NET Framework Security

See Also

Reference

WorkspaceSpec Class

Microsoft.TeamFoundation.VersionControl.Common Namespace