Class CalendarCollection

Class CalendarCollection

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

表示一组 Aspose.Tasks.Calendar 对象。

public class CalendarCollection : IList<calendar>, ICollection<calendar>, IEnumerable<calendar>, IEnumerable

继承

objectCalendarCollection

实现

IList<calendar>, ICollection<calendar>, IEnumerable<calendar>, IEnumerable

继承成员

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

属性

Count

获取此 Aspose.Tasks.CalendarCollection 对象中包含的对象数量。

public int Count { get; }

属性值

int

方法

Add(string)

向此 CalendarCollection 对象添加一个新的基础日历并返回添加的日历。

public Calendar Add(string name)

参数

name string

日历名称。

返回

Calendar

添加的 Aspose.Tasks.Calendar 对象。

异常

ArgumentException

当日历名称为 null 时抛出。

Add(string, Calendar)

向此 CalendarCollection 对象添加一个具有指定基础日历的新日历并返回添加的日历。

public Calendar Add(string name, Calendar baseCalendar)

参数

name string

指定的名称。

baseCalendar Calendar

指定的基础日历。

返回

Calendar

添加的 Aspose.Tasks.Calendar 对象。

GetByName(string)

返回具有指定名称的日历。

public Calendar GetByName(string name)

参数

name string

日历的名称。

返回

Calendar

如果找到则返回具有指定名称的日历,否则返回 null。

GetByUid(int)

返回具有指定 UID 的日历。

public Calendar GetByUid(int uid)

参数

uid int

日历的 UID。

返回

Calendar

具有指定 UID 的日历。

GetEnumerator()

返回此集合的枚举器。

public IEnumerator<calendar> GetEnumerator()

返回

IEnumerator<Calendar&gt;

此集合的枚举器。

Remove(Calendar)

从项目 CalendarCollection 中移除日历。

public bool Remove(Calendar item)

参数

item Calendar

要移除的日历。

返回

bool

如果移除成功返回 true,否则返回 false。

异常

InvalidOperationException

当日历无法被移除时抛出。

ToList()

将 CalendarCollection 对象转换为 Aspose.Tasks.Calendar 对象的列表。

public List<calendar> ToList()

返回

List<Calendar&gt;

Aspose.Tasks.Calendar 对象的列表。

 中文