AssignmentBaseline Class

Represents Baseline of a resource assignment.
Inheritance Hierarchy

Namespace:  Aspose.Tasks
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.5
Syntax
public class AssignmentBaseline : Baseline, 
	IEquatable<AssignmentBaseline>, IComparable<AssignmentBaseline>

The AssignmentBaseline type exposes the following members.

Constructors
  NameDescription
Public methodAssignmentBaseline
Initializes a new instance of the AssignmentBaseline class
Properties
  NameDescription
Public propertyCode exampleBaselineNumber
Gets or sets the unique number of a baseline data record.
(Inherited from Baseline.)
Public propertyCode exampleBcwp
Gets or sets the budgeted cost of a work performed by a resource for a project to-date.
(Inherited from Baseline.)
Public propertyCode exampleBcws
Gets or sets the budget cost of a work scheduled for a resource.
(Inherited from Baseline.)
Public propertyCode exampleCost
Gets or sets the projected cost of a resource when the baseline is saved.
(Inherited from Baseline.)
Public propertyCode exampleFinish
Gets or sets the scheduled finish date of the resource assignment when the baseline was saved.

Field Value

Type: 
The finish date of the resource assignment when this baseline was saved.
Public propertyCode exampleStart
Gets or sets the scheduled start date of the resource assignment when the baseline was saved.

Field Value

Type: 
The start date of the resource assignment when this baseline was saved.
Public propertyCode exampleTimephasedData
Gets or sets the TimephasedDataCollection instance for this object. The time phased data associated with the resource assignment baseline.

Return Value

Type: 
returns TimephasedDataCollection instance for this object.

Field Value

Type: 
The collection of Time phased data associated with this baseline.
Public propertyCode exampleWork
Gets or sets the work assigned to a resource when the baseline is saved.

Field Value

Type: 
The amount of assigned work to a resource when the baseline was saved.
(Inherited from Baseline.)
Methods
  NameDescription
Public methodCode exampleCompareTo(AssignmentBaseline)
IComparable interface implementation. Compares this instance to the specified Baseline object.
Public methodCode exampleCompareTo(Baseline)
IComparable interface implementation. Compares this instance to the specified Baseline object.
(Inherited from Baseline.)
Public methodCode exampleEquals(Object)
Returns a value indicating whether this instance is equal to a specified object.
(Overrides BaselineEquals(Object).)
Public methodCode exampleEquals(AssignmentBaseline)
Returns a value indicating whether this instance is equal to the specified AssignmentBaseline object.
Public methodCode exampleEquals(Baseline)
Returns a value indicating whether this instance is equal to a specified object.
(Inherited from Baseline.)
Protected methodFinalize (Inherited from Object.)
Public methodCode exampleGetHashCode
Returns a hash code value for the baseline.
(Overrides BaselineGetHashCode.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Examples
Shows how to work with baselines of assignments.
var project = new Project(DataDir + "AssignmentBaseline2007.mpp");

// assignment baselines are set when one sets the baseline on whole project
project.SetBaseline(BaselineType.Baseline);

// read assignment baseline information
foreach (var assignment in project.ResourceAssignments)
{
    foreach (var baseline in assignment.Baselines)
    {
        Console.WriteLine("Baseline Start: " + baseline.Start);
        Console.WriteLine("Baseline Finish: " + baseline.Finish);
        Console.WriteLine("Baseline Number: " + baseline.BaselineNumber);
        Console.WriteLine("Bcwp: " + baseline.Bcwp);
        Console.WriteLine("Bcws: " + baseline.Bcws);
        Console.WriteLine("Cost: " + baseline.Cost);
        Console.WriteLine("Work: " + baseline.Work);
        if (baseline.TimephasedData != null)
        {
            foreach (var td in baseline.TimephasedData)
            {
                Console.WriteLine("TD Start: " + td.Start);
                Console.WriteLine("TD Finish: " + td.Finish);
                Console.WriteLine("TD Timephased Data Type: " + td.TimephasedDataType);
                Console.WriteLine();
            }
        }

        Console.WriteLine();
    }

    Console.WriteLine();
}

// check baseline equality
var assn1 = project.ResourceAssignments.GetByUid(5);
var assn2 = project.ResourceAssignments.GetByUid(7);

var assignmentBaseline1 = assn1.Baselines.ToList()[0];
var assignmentBaseline2 = assn2.Baselines.ToList()[0];

// baselines can be compared by using 'Equals' method overloads
Console.WriteLine("Are baselines equal: " + assignmentBaseline1.Equals(assignmentBaseline2));

// or by using overloaded arithmetic operation
Console.WriteLine("Is baseline 1 less than baseline 2: " + (assignmentBaseline1 < assignmentBaseline2));

// the baseline hashcode is based on baseline number
Console.WriteLine("Assignment baseline 1 hashcode: " + assignmentBaseline1.GetHashCode());
Console.WriteLine("Assignment baseline 2 hashcode: " + assignmentBaseline2.GetHashCode());
See Also