Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Reference for Team Foundation Server SDK
VersionControlServer.GetItems Method (String)

Retrieves a list of all Items in the database that match the specified path.

Namespace: Microsoft.TeamFoundation.VersionControl.Client
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in microsoft.teamfoundation.versioncontrol.client.dll)

Visual Basic (Declaration)
Public Function GetItems ( _
	path As String _
) As ItemSet
Visual Basic (Usage)
Dim instance As VersionControlServer
Dim path As String
Dim returnValue As ItemSet

returnValue = instance.GetItems(path)
C#
public ItemSet GetItems (
	string path
)
C++
public:
ItemSet^ GetItems (
	String^ path
)
J#
public ItemSet GetItems (
	String path
)
JScript
public function GetItems (
	path : String
) : ItemSet

Parameters

path

The path of the Item or Items being listed that may be on a server or on the local computer.

Return Value

Returns an ItemSet that contains a collection of matching Items.

If the path argument is a file, returns a set of Items that contain just that file. If the path is a folder, returns a set of Items that contain all items in that folder. If the path contains a wildcard character, returns a set of Items in the specified folder that match the wildcard.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
C# Example for GetAllItems(string path)      Mahiways   |   Edit   |   Show History
  
         private static ItemSet GetAllItems(string path)
{
// Get a reference to our Team Foundation Server.
String tfsName = @" http://ps4474:8080 ";
TeamFoundationServer tfs = new TeamFoundationServer(tfsName);
             // Get a reference to Version Control. 
VersionControlServer versionControl = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
             ItemSet allItems = versionControl.GetItems(path);
             int index =0;
             foreach (Item item in allItems.Items)
{
index++;
Console.WriteLine("ITEM" + index + " : ");
Console.WriteLine(item.ToString());
}
             return allItems;
}
  

~ Mahesh Lambe

http://mahiways.spaces.live.com/

http://maheshlambe.blogspot.com/

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker