Aspose.Tasks for C++
Aspose::Tasks::WeekDay Class Reference

Represents a weekday which either defines regular days of a week or exception days in a calendar. More...

#include <WeekDay.h>

Inherits System::Object.

Public Member Functions

Aspose::Tasks::DayType get_DayType () const
 Gets the type of a day. More...
 
bool get_DayWorking () const
 Gets a value indicating whether the specified date or day type is working. More...
 
void set_DayWorking (bool value)
 Sets a value indicating whether the specified date or day type is working. More...
 
System::DateTime get_FromDate () const
 Gets the beginning of an exception time. More...
 
void set_FromDate (System::DateTime value)
 Sets the beginning of an exception time. More...
 
System::DateTime get_ToDate () const
 Gets the end of an exception time. More...
 
void set_ToDate (System::DateTime value)
 Sets the end of an exception time. More...
 
System::SharedPtr< WorkingTimeCollectionget_WorkingTimes () const
 Gets WorkingTimeCollection for this WeekDay instance. The collection of working times that define the time worked on the weekday. More...
 
 WeekDay (Aspose::Tasks::DayType dayType)
 Initializes a new instance of the WeekDay class with the specified day type. More...
 
 WeekDay (Aspose::Tasks::DayType dayType, const System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< WorkingTime >>> &workingTimes)
 Initializes a new instance of the WeekDay class with the specified day type and list of working time periods. More...
 
 WeekDay (Aspose::Tasks::DayType dayType, const System::ArrayPtr< System::SharedPtr< WorkingTime >> &workingTimes)
 Initializes a new instance of the WeekDay class with the specified day type and working time periods. More...
 
 WeekDay ()
 Initializes a new instance of the WeekDay class. More...
 
System::TimeSpan GetWorkingTime ()
 Returns the working time for a week day. More...
 
System::SharedPtr< WeekDayClone ()
 Returns a deep copy of the week day. More...
 
bool Equals (System::SharedPtr< System::Object > obj) override
 Returns a value indicating whether this instance is equal to a specified object. More...
 
int32_t GetHashCode () const override
 Returns a hash code value for the instance of the WeekDay class. More...
 

Static Public Member Functions

static System::SharedPtr< WeekDayCreateDefaultWorkingDay (Aspose::Tasks::DayType dayType)
 Creates default working day. More...
 
static Aspose::Tasks::DayType CastToDayType (System::DayOfWeek dw)
 Casts .Net's DayOfWeek to DayType. More...
 
static void SetDefaultWorkingTime (const System::SharedPtr< WeekDay > &day)
 Sets default time periods for the specified week day. More...
 

Detailed Description

Represents a weekday which either defines regular days of a week or exception days in a calendar.

Constructor & Destructor Documentation

◆ WeekDay() [1/4]

Aspose::Tasks::WeekDay::WeekDay ( Aspose::Tasks::DayType  dayType)

Initializes a new instance of the WeekDay class with the specified day type.

Parameters
dayTypeThe specified day type.

◆ WeekDay() [2/4]

Aspose::Tasks::WeekDay::WeekDay ( Aspose::Tasks::DayType  dayType,
const System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< WorkingTime >>> &  workingTimes 
)

Initializes a new instance of the WeekDay class with the specified day type and list of working time periods.

Parameters
dayTypeThe specified day type.
workingTimesList of working time periods.

◆ WeekDay() [3/4]

Aspose::Tasks::WeekDay::WeekDay ( Aspose::Tasks::DayType  dayType,
const System::ArrayPtr< System::SharedPtr< WorkingTime >> &  workingTimes 
)

Initializes a new instance of the WeekDay class with the specified day type and working time periods.

Parameters
dayTypeThe specified day type.
workingTimesArray of working time periods.

◆ WeekDay() [4/4]

Aspose::Tasks::WeekDay::WeekDay ( )

Initializes a new instance of the WeekDay class.

Member Function Documentation

◆ CastToDayType()

static Aspose::Tasks::DayType Aspose::Tasks::WeekDay::CastToDayType ( System::DayOfWeek  dw)
static

Casts .Net's DayOfWeek to DayType.

Parameters
dwThe day of week to cast from.
Returns
A cast day type.

◆ Clone()

System::SharedPtr<WeekDay> Aspose::Tasks::WeekDay::Clone ( )

Returns a deep copy of the week day.

Returns
Returns the deep copy of the week day.

◆ CreateDefaultWorkingDay()

static System::SharedPtr<WeekDay> Aspose::Tasks::WeekDay::CreateDefaultWorkingDay ( Aspose::Tasks::DayType  dayType)
static

Creates default working day.

Parameters
dayTypeThe day type to create default working day from.
Returns
A default working day with working times 8-12 and 13-17.

◆ Equals()

bool Aspose::Tasks::WeekDay::Equals ( System::SharedPtr< System::Object >  obj)
override

Returns a value indicating whether this instance is equal to a specified object.

Parameters
objThe object to compare with this instance.
Returns
True if the specified object is a WeekDay that has the same FromDate, ToDate values and WorkingTimes as this instance; otherwise, false.

◆ get_DayType()

Aspose::Tasks::DayType Aspose::Tasks::WeekDay::get_DayType ( ) const

Gets the type of a day.

◆ get_DayWorking()

bool Aspose::Tasks::WeekDay::get_DayWorking ( ) const

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

◆ get_FromDate()

System::DateTime Aspose::Tasks::WeekDay::get_FromDate ( ) const

Gets the beginning of an exception time.

◆ get_ToDate()

System::DateTime Aspose::Tasks::WeekDay::get_ToDate ( ) const

Gets the end of an exception time.

◆ get_WorkingTimes()

System::SharedPtr<WorkingTimeCollection> Aspose::Tasks::WeekDay::get_WorkingTimes ( ) const

Gets WorkingTimeCollection for this WeekDay instance. The collection of working times that define the time worked on the weekday.

◆ GetHashCode()

int32_t Aspose::Tasks::WeekDay::GetHashCode ( ) const
override

Returns a hash code value for the instance of the WeekDay class.

Returns
returns a hash code value for this object.

◆ GetWorkingTime()

System::TimeSpan Aspose::Tasks::WeekDay::GetWorkingTime ( )

Returns the working time for a week day.

Returns
Working time.

◆ set_DayWorking()

void Aspose::Tasks::WeekDay::set_DayWorking ( bool  value)

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

◆ set_FromDate()

void Aspose::Tasks::WeekDay::set_FromDate ( System::DateTime  value)

Sets the beginning of an exception time.

◆ set_ToDate()

void Aspose::Tasks::WeekDay::set_ToDate ( System::DateTime  value)

Sets the end of an exception time.

◆ SetDefaultWorkingTime()

static void Aspose::Tasks::WeekDay::SetDefaultWorkingTime ( const System::SharedPtr< WeekDay > &  day)
static

Sets default time periods for the specified week day.

Parameters
dayThe week day to set default working day on.