Add
TaskCollection.Add method (1 of 5)
Add the specified task to the instance of the TaskCollection
class. If ParentProject.CalculationMode is None user should invoke Project.Recalculate() after using this method (It will reschedule all project tasks (start/finish dates, sets early/late dates) and calculate the dependent fields such as slacks, work and cost fields, ids and outline levels). If ParentProject.CalculationMode is Manual the method will calculate only task id, outline level and outline numbers automatically. If ParentProject.CalculationMode is Automatic the method reschedules all project’s tasks automatically (start/finish dates, sets early/late dates, calculates slacks, work and cost fields, recalculates ids and outline levels).
public void Add(Task item)
Parameter | Type | Description |
---|---|---|
item | Task | the specified task which should be added to this task collection. |
See Also
- class Task
- class TaskCollection
- namespace Aspose.Tasks
- assembly Aspose.Tasks
TaskCollection.Add method (2 of 5)
Adds new task to project tasks collection on the same outline level of the last task.
public Task Add()
Return Value
returns the newly added instance of the Task
class.
See Also
- class Task
- class TaskCollection
- namespace Aspose.Tasks
- assembly Aspose.Tasks
TaskCollection.Add method (3 of 5)
Adds a new task to children tasks collection.
public Task Add(string taskName)
Parameter | Type | Description |
---|---|---|
taskName | String | the specified task name. |
Return Value
returns the newly added instance of the Task
class.
See Also
- class Task
- class TaskCollection
- namespace Aspose.Tasks
- assembly Aspose.Tasks
TaskCollection.Add method (4 of 5)
Adds a new recurring task to children tasks collection.
public Task Add(string taskName, int beforeTaskId)
Parameter | Type | Description |
---|---|---|
taskName | String | the specified task name. |
beforeTaskId | Int32 | The specified id of a task before which a new task will be inserted. |
Return Value
returns a task which was inserted before a task with the specified id.
Exceptions
exception | condition |
---|---|
ArgumentOutOfRangeException | ArgumentOutOfRangeException is thrown if the specified id is not a valid task id. |
See Also
- class Task
- class TaskCollection
- namespace Aspose.Tasks
- assembly Aspose.Tasks
TaskCollection.Add method (5 of 5)
Inserts a new task before a task with the specified id and on the same outline level.
public Task Add(RecurringTaskParameters parameters)
Parameter | Type | Description |
---|---|---|
parameters | RecurringTaskParameters | The parameters the specified parameters for creation of recurring task. |
Return Value
returns the newly added instance of the Task
class.
Exceptions
exception | condition |
---|---|
ArgumentNullException | Thrown if the specified parameters are null. |
ArgumentException | Thrown if the specified parameters are invalid. |
See Also
- class Task
- class RecurringTaskParameters
- class TaskCollection
- namespace Aspose.Tasks
- assembly Aspose.Tasks