SetBaseline

SetBaseline(BaselineType)

Saves baseline fields to the specified baseline for the entire project.

public void SetBaseline(BaselineType baselineType)
ParameterTypeDescription
baselineTypeBaselineTypeThe baseline type to save baseline data to.

Examples

Shows how to create baselines for a whole project.

var project = new Project();

// Adding tasks
project.RootTask.Children.Add("Task");
project.RootTask.Children.Add("Task2");

// Set baseline for specified tasks
project.SetBaseline(BaselineType.Baseline);

See Also


SetBaseline(BaselineType, IEnumerable<Task>)

Saves baseline fields to the specified baseline for the selected tasks.

public void SetBaseline(BaselineType baselineType, IEnumerable<Task> taskCollection)
ParameterTypeDescription
baselineTypeBaselineTypeThe baseline type to save baseline data to.
taskCollectionIEnumerable`1List of tasks to save baseline data for.

Examples

Shows how to create set baselines for specific tasks.

var project = new Project();

// Adding tasks
var task = project.RootTask.Children.Add("Task");
var task2 = project.RootTask.Children.Add("Task2");

// Set baseline for specified tasks
project.SetBaseline(BaselineType.Baseline, new[] { task, task2 });

See Also