VersionControlServer.ServerItemExists Method (String, VersionSpec, DeletedState, ItemType)
Returns true if the server item of the specified type is in the database.
Namespace: Microsoft.TeamFoundation.VersionControl.Client
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)
Syntax
'Declaration
Public Function ServerItemExists ( _
path As String, _
version As VersionSpec, _
deletedState As DeletedState, _
itemType As ItemType _
) As Boolean
'Usage
Dim instance As VersionControlServer
Dim path As String
Dim version As VersionSpec
Dim deletedState As DeletedState
Dim itemType As ItemType
Dim returnValue As Boolean
returnValue = instance.ServerItemExists(path, _
version, deletedState, itemType)
public bool ServerItemExists(
string path,
VersionSpec version,
DeletedState deletedState,
ItemType itemType
)
public:
bool ServerItemExists(
String^ path,
VersionSpec^ version,
DeletedState deletedState,
ItemType itemType
)
public function ServerItemExists(
path : String,
version : VersionSpec,
deletedState : DeletedState,
itemType : ItemType
) : boolean
Parameters
- path
Type: System.String
deletedState
Type: Microsoft.TeamFoundation.VersionControl.Client.DeletedStateThe DeletedState.NonDeleted from which you want to get a non-deleted item, the DeletedState.Deleted from which you want to search for a deleted item, or the DeletedState.Any from which returns the value true if either is found.
itemType
Type: Microsoft.TeamFoundation.VersionControl.Client.ItemTypeThe ItemType.Folder from which you want to search for a folder, the ItemType.File from which you want to search for a file, or the ItemType.Any from which returns the value true if either is found.
Return Value
Type: System.Boolean
true if the item is in the database, otherwise it is false.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.