共用方式為


Workspace.TryGetServerItemForLocalItem Method (String, Boolean)

Gets the corresponding server item for a local item.

Does not throw ItemNotMappedException or ItemCloakedException.

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

Syntax

'Declaration
Public Function TryGetServerItemForLocalItem ( _
    localItem As String, _
    detectImplicitCloak As Boolean _
) As String
public string TryGetServerItemForLocalItem(
    string localItem,
    bool detectImplicitCloak
)
public:
String^ TryGetServerItemForLocalItem(
    String^ localItem, 
    bool detectImplicitCloak
)
member TryGetServerItemForLocalItem : 
        localItem:string * 
        detectImplicitCloak:bool -> string
public function TryGetServerItemForLocalItem(
    localItem : String, 
    detectImplicitCloak : boolean
) : String

Parameters

  • detectImplicitCloak
    Type: System.Boolean

    If true, detect and return null if the local item is implicitly cloaked in the workspace

Return Value

Type: System.String
The corresponding server item for the local item

Remarks

First shipped in TFS 2012

.NET Framework Security

See Also

Reference

Workspace Class

TryGetServerItemForLocalItem Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace