Class CalendarException
Namespace: Aspose.Tasks
Assembly: Aspose.Tasks.dll (25.2.0)
表示日历中的特殊时间段。
[ClassInterface(ClassInterfaceType.AutoDual)]
public sealed class CalendarException
继承
继承成员
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
构造函数
CalendarException()
初始化 Aspose.Tasks.CalendarException 类的新实例。
public CalendarException()
属性
DayWorking
获取或设置一个值,指示指定日期或日期类型是否为工作日。
public bool DayWorking { get; set; }
属性值
DaysOfWeek
获取此对象的 DayTypeCollection。 异常有效的星期几。
public DayTypeCollection DaysOfWeek { get; }
属性值
EnteredByOccurrences
获取或设置一个值,指示复发范围是否通过输入发生次数来定义。 False 指定复发范围是通过输入结束日期来定义的。
public bool EnteredByOccurrences { get; set; }
属性值
FromDate
获取或设置异常时间的开始。
public DateTime FromDate { get; set; }
属性值
Month
获取或设置计划发生异常的月份。
public Month Month { get; set; }
属性值
MonthDay
获取或设置计划发生异常的月份中的某一天。
public int MonthDay { get; set; }
属性值
MonthItem
获取或设置计划发生异常的月份项。
public MonthItemType MonthItem { get; set; }
属性值
MonthPosition
获取或设置某个月项在月份中的位置。
public MonthPosition MonthPosition { get; set; }
属性值
Name
获取或设置异常的名称。
public string Name { get; set; }
属性值
Occurrences
获取或设置日历异常有效的发生次数。
public int Occurrences { get; set; }
属性值
ParentCalendar
获取此对象的父日历。
public Calendar ParentCalendar { get; }
属性值
Period
获取或设置异常的复发周期。
public int Period { get; set; }
属性值
ToDate
获取或设置异常时间的结束。
public DateTime ToDate { get; set; }
属性值
Type
获取或设置异常类型。
public CalendarExceptionType Type { get; set; }
属性值
WorkingTimes
获取或设置 WorkingTimeCollection 对象。
定义在工作日工作的工作时间集合。
public WorkingTimeCollection WorkingTimes { get; set; }
属性值
方法
CheckException(DateTime)
如果指定的 System.DateTime 结构实例是异常日,则返回 true。
public bool CheckException(DateTime dt)
参数
dt
DateTime
指定的 System.DateTime 结构实例。
返回
如果 System.DateTime 值是异常日,则返回 true;否则返回 false。
Delete()
从父日历 CalendarExceptionCollection 对象中删除异常实例。
public void Delete()
GetExceptionDates()
返回日历异常适用的日期。
public IEnumerable<datetime> GetExceptionDates()
返回
IEnumerable<DateTime>
返回日历异常适用的异常日期集合。
GetWorkingTime()
返回日历异常的工作时间。
public TimeSpan GetWorkingTime()
返回
返回此日历异常的工作时间。