Class CalendarException

Class CalendarException

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

Represent exceptional time periods in a calendar.

[ClassInterface(ClassInterfaceType.AutoDual)]
public sealed class CalendarException

Inheritance

objectCalendarException

Inherited Members

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

Constructors

CalendarException()

Initializes a new instance of the Aspose.Tasks.CalendarException class.

public CalendarException()

Properties

DayWorking

Gets or sets a value indicating whether the specified date or day type is working.

public bool DayWorking { get; set; }

Property Value

bool

DaysOfWeek

Gets the DayTypeCollection for this object. The days of the week on which the exception is valid.

public DayTypeCollection DaysOfWeek { get; }

Property Value

DayTypeCollection

EnteredByOccurrences

Gets or sets a value indicating whether the range of recurrence is defined by entering a number of occurrences. False specifies that the range of recurrence is defined by entering a finish date.

public bool EnteredByOccurrences { get; set; }

Property Value

bool

FromDate

Gets or sets the beginning of the exception time.

public DateTime FromDate { get; set; }

Property Value

DateTime

Month

Gets or sets the month for which an exception recurrence is scheduled.

public Month Month { get; set; }

Property Value

Month

MonthDay

Gets or sets the day of a month on which an exception recurrence is scheduled.

public int MonthDay { get; set; }

Property Value

int

MonthItem

Gets or sets the month item for which an exception recurrence is scheduled.

public MonthItemType MonthItem { get; set; }

Property Value

MonthItemType

MonthPosition

Gets or sets the position of a month item within a month.

public MonthPosition MonthPosition { get; set; }

Property Value

MonthPosition

Name

Gets or sets the name of the exception.

public string Name { get; set; }

Property Value

string

Occurrences

Gets or sets the number of occurrences for which the calendar exception is valid.

public int Occurrences { get; set; }

Property Value

int

ParentCalendar

Gets the parent calendar for this object.

public Calendar ParentCalendar { get; }

Property Value

Calendar

Period

Gets or sets the period of recurrence for the exception.

public int Period { get; set; }

Property Value

int

ToDate

Gets or sets the end of the exception time.

public DateTime ToDate { get; set; }

Property Value

DateTime

Type

Gets or sets the exception type.

public CalendarExceptionType Type { get; set; }

Property Value

CalendarExceptionType

WorkingTimes

Gets or sets the WorkingTimeCollection object. The collection of working times that defines the time worked on the weekday. At least one working time must present, and there can’t be more than five.

public WorkingTimeCollection WorkingTimes { get; set; }

Property Value

WorkingTimeCollection

Methods

CheckException(DateTime)

Returns true if the specified instance of the System.DateTime struct is the exception day.

public bool CheckException(DateTime dt)

Parameters

dt DateTime

the specified instance of the System.DateTime struct.

Returns

bool

Returns true if System.DateTime value is the exception day; otherwise, false.

Delete()

Deletes the Exception instance from parent calendar CalendarExceptionCollection object.

public void Delete()

GetExceptionDates()

Returns dates on which the calendar exception is applicable.

public IEnumerable<datetime> GetExceptionDates()

Returns

IEnumerable<DateTime&gt;

Returns a collection of exception dates the calendar exception is applicable for.

GetWorkingTime()

Returns the working time for a calendar exception.

public TimeSpan GetWorkingTime()

Returns

TimeSpan

Returns working time for this calendar exception.