Class CalendarCollection
Namespace: Aspose.Tasks
Assembly: Aspose.Tasks.dll (25.2.0)
Represents a collection of Aspose.Tasks.Calendar objects.
public class CalendarCollection : IList<calendar>, ICollection<calendar>, IEnumerable<calendar>, IEnumerable
Inheritance
Implements
IList<calendar>, ICollection<calendar>, IEnumerable<calendar>, 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.CalendarCollection object.
public int Count { get; }
Property Value
Methods
Add(string)
Adds a new base calendar to this CalendarCollection object and returns added calendar.
public Calendar Add(string name)
Parameters
name
string
Calendar name.
Returns
Added Aspose.Tasks.Calendar object.
Exceptions
Thrown when calendar name is null.
Add(string, Calendar)
Adds a new calendar with specified base calendar to this CalendarCollection object and returns added calendar.
public Calendar Add(string name, Calendar baseCalendar)
Parameters
name
string
Specified name.
baseCalendar
Calendar
Specified base calendar.
Returns
Added Aspose.Tasks.Calendar object.
GetByName(string)
Returns a calendar with the specified name.
public Calendar GetByName(string name)
Parameters
name
string
Name of a calendar.
Returns
If found returns calendar with a specified name else returns null.
GetByUid(int)
Returns a calendar with the specified UID.
public Calendar GetByUid(int uid)
Parameters
uid
int
UID of a calendar.
Returns
Calendar with a specified UID.
GetEnumerator()
Returns an enumerator for this collection.
public IEnumerator<calendar> GetEnumerator()
Returns
IEnumerator<Calendar>
an enumerator for this collection.
Remove(Calendar)
Removes Calendar from Project CalendarCollection.
public bool Remove(Calendar item)
Parameters
item
Calendar
The calendar to remove.
Returns
If removed returns true, else returns false.
Exceptions
Thrown when calendar cannot be removed.
ToList()
Converts the CalendarCollection object to a list of Aspose.Tasks.Calendar objects.
public List<calendar> ToList()
Returns
List of Aspose.Tasks.Calendar objects. </calendar></calendar></calendar>