Class LevelingOptions
Contents
[
Hide
]LevelingOptions class
Allows to specify parameters of resource leveling.
public sealed class LevelingOptions
Constructors
Name | Description |
---|---|
LevelingOptions() | Initializes a new instance of the LevelingOptions class. |
Properties
Name | Description |
---|---|
CancellationToken { get; set; } | Gets or sets a token which can be used to cancel a project leveling operation. |
FinishDate { get; set; } | Gets or sets leveling period end date. The default value is the project`s finish date. |
LevelingOrder { get; set; } | Gets the order in which the leveling algorithm delays tasks that have overallocations. After determination of tasks causing the overallocation and which tasks can be delayed, the specified order is used which task should be delayed first. |
MessageHandler { get; set; } | Gets or sets message handler callback which can be used to intercept log messages produced by Aspose.Tasks during resource leveling. |
MessageLevel { get; set; } | Gets or sets level of log messages emitted by Aspose.Tasks during resource leveling. |
Resources { get; set; } | Gets or sets the list of the resources which will be leveled. If null is set, all project resources will be leveled. |
StartDate { get; set; } | Gets or sets leveling period start date. The default value is the project`s start date. |
Examples
Shows how to level specific resource, customize leveling options and examine leveling algorithm messages.
var project = new Project(DataDir + "Software Development Plan.mpp");
var levelingOptions = new LevelingOptions();
levelingOptions.StartDate = new DateTime(2013, 3, 10);
levelingOptions.FinishDate = new DateTime(2013, 4, 30);
levelingOptions.Resources = new List<Resource> { project.Resources.GetById(7) };
levelingOptions.MessageLevel = MessageLevel.Information;
levelingOptions.MessageHandler = new LevelingMessageHandler();
ResourceLeveler.LevelResources(project, levelingOptions);
See Also
- namespace Aspose.Tasks.Leveling
- assembly Aspose.Tasks