ProjectServerManager.GetProjectList
Contents
[
Hide
]ProjectServerManager.GetProjectList method
Gets the list of projects from ‘Working’ store of the current Project Online account \ Project Server instance.
public IEnumerable<ProjectInfo> GetProjectList()
Return Value
An enumeration of projects in the current Project Online account \ Project Server instance.
Examples
Shows how to read a project from Microsoft Project Online.
const string SharepointDomainAddress = "https://contoso.sharepoint.com/sites/pwa";
const string UserName = "admin@contoso.onmicrosoft.com";
const string Password = "MyPassword";
var credentials = new ProjectServerCredentials(SharepointDomainAddress, UserName, Password);
var manager = new ProjectServerManager(credentials);
IEnumerable<ProjectInfo> list = manager.GetProjectList();
foreach (var info in list)
{
var project = manager.GetProject(info.Id);
Console.WriteLine("{0} - {1} - {2}", info.Name, info.CreatedDate, info.LastSavedDate);
Console.WriteLine("Resources count: {0}", project.Resources.Count);
}
See Also
- class ProjectInfo
- class ProjectServerManager
- namespace Aspose.Tasks
- assembly Aspose.Tasks