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)

Syntax

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.
Remarks

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.

See Also

Tags :


Community Content

Mahiways
C# Example for GetAllItems(string path)
  
         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 :

Page view tracker