FRAMES | NO FRAMES |
Gets the list of all project items available in the given folder.
Availability: Business Analyst Server.
esriFolderItem[] GetListProjectItems ( string WorkspaceName, string ProjectName, esriFolderType FolderType );
Parameter | Description |
---|---|
WorkspaceName | Workspace name. Type String. |
ProjectName | Project name. Type String. |
FolderType | Folder type. Type esriFolderType. |
Variable of type esriFolderItem[] containing the list of items stored in the given project folder.
The example below iterates through the Default Project of the Default Workspace in the Business Analyst Server Repository and stores the name and type of its contents in a string array.
C# |
// Instantiate the BAServerHelper class to access analysis methods BAServerHelper baServerHelper = new BAServerHelper(); string workspace = "Default Workspace"; string project = "Default Project"; // Obtain a reference to all Business Analyst Server folder types. Array folderTypes = Enum.GetValues(typeof(esriFolderType)); System.Collections.ArrayList contentsList = new System.Collections.ArrayList(); // Iterate through repository folders foreach (esriFolderType folderType in folderTypes) { esriFolderItem[] items = baServerHelper.GetListProjectItems(workspace, project, folderType); if (items.Length > 0) { // List the contents of each folder foreach (esriFolderItem item in items) { contentsList.Add("(" + folderType + ") " + item.itemName); } } // Else, their are not contents of this type else { contentsList.Add("(" + folderType + ") <EMPTY>"); } } // Convert the contents list to a string array string[] contentsArray = (string[])contentsList.ToArray(typeof(string)); |