BaselineCollection Class |
Namespace: Aspose.Tasks
The BaselineCollection type exposes the following members.
| Name | Description | |
|---|---|---|
| Count |
Gets the number of objects contained in this BaselineCollection object.
| |
| Item |
Returns the element at the specified index.
| |
| ParentResource |
Gets the parent Resource for this collection.
|
| Name | Description | |
|---|---|---|
| Add |
This is the stub implementation of ICollection's Add method, that only throws NotSupportedException
| |
| Equals | (Inherited from Object.) | |
| Finalize | (Inherited from Object.) | |
| GetEnumerator |
Returns an enumerator for this collection.
| |
| GetHashCode | (Inherited from Object.) | |
| GetType | (Inherited from Object.) | |
| MemberwiseClone | (Inherited from Object.) | |
| Remove |
Removes baseline from this collection.
| |
| ToList |
Converts the BaselineCollection object to a list of Baseline objects.
| |
| ToString | (Inherited from Object.) |
var project = new Project(DataDir + "WorkWithBaselineCollection.mpp"); var resource = project.Resources.GetByUid(1); Console.WriteLine("Count of assignment baselines: " + resource.Baselines.Count); Console.WriteLine("Parent Resource Name: " + resource.Baselines.ParentResource.Get(Rsc.Name)); // read baseline information foreach (var baseline in resource.Baselines) { Console.WriteLine("Baseline Number: " + baseline.BaselineNumber); Console.WriteLine("Cost: " + baseline.Cost); Console.WriteLine("Work: " + baseline.Work); Console.WriteLine("BCWP: " + baseline.Bcwp); Console.WriteLine("BCWS: " + baseline.Bcws); Console.WriteLine(); } Console.WriteLine("Delete all baselines: "); List<Baseline> baselines = resource.Baselines.ToList(); foreach (var baseline in baselines) { Console.WriteLine("Delete baseline with name: " + baseline.BaselineNumber); resource.Baselines.Remove(baseline); }