Class ResourceAssignmentCollection
Namespace: Aspose.Tasks
Assembly: Aspose.Tasks.dll (25.2.0)
Represents a collection of Aspose.Tasks.ResourceAssignment objects.
public class ResourceAssignmentCollection : IList<resourceassignment>, ICollection<resourceassignment>, IEnumerable<resourceassignment>, IEnumerable
Inheritance
object ← ResourceAssignmentCollection
Implements
IList<resourceassignment>, ICollection<resourceassignment>, IEnumerable<resourceassignment>, 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 the ResourceAssignmentCollection.
public int Count { get; }
Property Value
IsReadOnly
Gets a value indicating whether this collection is read only.
public bool IsReadOnly { get; }
Property Value
ParentProject
Gets the parent project of the ResourceAssignmentCollection object.
public Project ParentProject { get; }
Property Value
this[int]
Returns the element at the specified index.
public ResourceAssignment this[int index] { get; set; }
Property Value
Methods
Add(Task, Resource, double)
Adds new assignment to the ResourceAssignmentCollection.
public ResourceAssignment Add(Task task, Resource resource, double units)
Parameters
task
Task
A task to be assigned.
resource
Resource
A resource to be assigned.
units
double
The number of units for a new assignment.
Returns
Added assignment.
Add(Task, Resource, decimal)
Adds new assignment to the ResourceAssignmentCollection.
public ResourceAssignment Add(Task task, Resource resource, decimal cost)
Parameters
task
Task
A task to be assigned.
resource
Resource
A cost resource to be assigned.
cost
decimal
The cost for a new assignment.
Returns
Added assignment.
Add(Task, Resource)
Adds new assignment to the ResourceAssignmentCollection.
public ResourceAssignment Add(Task task, Resource resource)
Parameters
task
Task
A task to be assigned.
resource
Resource
A resource to be assigned.
Returns
Added assignment.
Add(ResourceAssignment)
This is the stub implementation of ICollection’s Add method, that only throws NotSupportedException
public void Add(ResourceAssignment item)
Parameters
item
ResourceAssignment
The item to remove.
GetByUid(int)
Returns an assignment with the specified uid.
public ResourceAssignment GetByUid(int uid)
Parameters
uid
int
The specified uid.
Returns
ResourceAssignment with the specified uid if present; otherwise, null.
Remarks
O(1) complexity.
GetEnumerator()
Returns an enumerator for this collection.
public IEnumerator<resourceassignment> GetEnumerator()
Returns
IEnumerator<ResourceAssignment>
an enumerator for this collection.
Remove(ResourceAssignment)
Removes specified assignment from collection, if it is not read-only, otherwise throws NotSupportedException.
public bool Remove(ResourceAssignment item)
Parameters
item
ResourceAssignment
The assignment to remove.
Returns
true, if specified item was removed, false otherwise.
RemoveAt(int)
Removes assignment at specified index, if collection is not read-only, otherwise throws NotSupportedException.
public void RemoveAt(int index)
Parameters
index
int
Zero-based index.
ToList()
Converts the ResourceAssignmentCollection object to a list of Aspose.Tasks.ResourceAssignment objects.
public List<resourceassignment> ToList()
Returns
List of Aspose.Tasks.ResourceAssignment objects. </resourceassignment></resourceassignment></resourceassignment>