Class TaskLinkCollection

Class TaskLinkCollection

Namespace: Aspose.Tasks
Assembly: Aspose.Tasks.dll (25.2.0)

Represents a collection of Aspose.Tasks.Task objects.

public class TaskLinkCollection : IList<tasklink>, ICollection<tasklink>, IEnumerable<tasklink>, IEnumerable

Inheritance

objectTaskLinkCollection

Implements

IList<tasklink>, ICollection<tasklink>, IEnumerable<tasklink>, IEnumerable

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties

Count

Gets the number of objects contained in this Aspose.Tasks.TaskLinkCollection object.

public int Count { get; }

Property Value

int

ParentProject

Gets the parent project of the ResourceAssignmentCollection object. parent Aspose.Tasks.Project for this object.

public Project ParentProject { get; }

Property Value

Project

this[int]

Returns or sets the element at the specified index.

public TaskLink this[int index] { get; set; }

Property Value

TaskLink

Methods

Add(Task, Task)

Returns an instance of Finish-Start Aspose.Tasks.TaskLink which has been added to the TaskLinkCollection object.

public TaskLink Add(Task pred, Task succ)

Parameters

pred Task

Predecessor task.

succ Task

Successor task.

Returns

TaskLink

a task link instance which has been added to this object.

Exceptions

ArgumentNullException

If any of input tasks is equal to null then System.ArgumentNullException will be thrown.

Add(Task, Task, TaskLinkType)

Returns an instance of Aspose.Tasks.TaskLink which has been added to the TaskLinkCollection object.

public TaskLink Add(Task pred, Task succ, TaskLinkType linkType)

Parameters

pred Task

Predecessor task.

succ Task

Successor task.

linkType TaskLinkType

Link type Aspose.Tasks.TaskLinkType

Returns

TaskLink

a task link instance which has been added to this object.

Exceptions

ArgumentNullException

If any of input tasks is equal to null then System.ArgumentNullException will be thrown.

Add(Task, Task, TaskLinkType, Duration)

Returns an instance of Aspose.Tasks.TaskLink which has been added to the TaskLinkCollection object.

public TaskLink Add(Task pred, Task succ, TaskLinkType linkType, Duration lag)

Parameters

pred Task

Predecessor task.

succ Task

Successor task.

linkType TaskLinkType

Link type Aspose.Tasks.TaskLinkType

lag Duration

Link lag Aspose.Tasks.Duration.

Returns

TaskLink

a task link which has been added to this object.

Exceptions

ArgumentNullException

If any of input tasks is equal to null then System.ArgumentNullException will be thrown.

Add(TaskLink)

This is the stub implementation of ICollection’s Add method, that only throws NotSupportedException

public void Add(TaskLink item)

Parameters

item TaskLink

The item to add.

GetEnumerator()

Returns an enumerator for this collection.

public IEnumerator<tasklink> GetEnumerator()

Returns

IEnumerator<TaskLink&gt;

an enumerator for this collection.

Remove(TaskLink)

Removes task link from a project.

public bool Remove(TaskLink item)

Parameters

item TaskLink

TaskLink to remove.

Returns

bool

removed TaskLink.

ToList()

Converts the TaskLinkCollection object to a list of Aspose.Tasks.TaskLink objects.

public List<tasklink> ToList()

Returns

List<TaskLink&gt;

List of Aspose.Tasks.TaskLink objects. </tasklink></tasklink></tasklink>