Represents a working time during a weekday.
More...
#include <WorkingTime.h>
Inherits Object.
|
| System::DateTime | get_From () const |
| | Gets the beginning of a working time. More...
|
| |
| System::DateTime | get_To () const |
| | Gets the end of a working time. More...
|
| |
| | WorkingTime (System::DateTime fromTime, System::DateTime toTime) |
| | Initializes a new instance of the WorkingTime class with a interval with the specified start and finish times. More...
|
| |
| | WorkingTime (System::TimeSpan fromTime, System::TimeSpan toTime) |
| | Initializes a new instance of the WorkingTime class with an interval item with the specified start and finish times. More...
|
| |
| | WorkingTime (int32_t fromHours, int32_t toHours) |
| | Initializes a new instance of the WorkingTime class with an interval item with the specified start and finish times. More...
|
| |
| bool | Equals (System::SharedPtr< System::Object > obj) override |
| | Checks that the objects are equal. More...
|
| |
| int32_t | GetHashCode () const override |
| | Returns a hash code value for the instance of the WorkingTime class. More...
|
| |
Represents a working time during a weekday.
◆ WorkingTime() [1/3]
| Aspose::Tasks::WorkingTime::WorkingTime |
( |
System::DateTime |
fromTime, |
|
|
System::DateTime |
toTime |
|
) |
| |
Initializes a new instance of the WorkingTime class with a interval with the specified start and finish times.
- Parameters
-
| fromTime | interval start time |
| toTime | interval end time |
◆ WorkingTime() [2/3]
| Aspose::Tasks::WorkingTime::WorkingTime |
( |
System::TimeSpan |
fromTime, |
|
|
System::TimeSpan |
toTime |
|
) |
| |
Initializes a new instance of the WorkingTime class with an interval item with the specified start and finish times.
- Parameters
-
| fromTime | Interval's start time represented by TimeSpan struct. |
| toTime | Interval's end time represented by TimeSpan struct. |
The overload of WorkingTime ctor can be used to initialize interval's start and end using TimeSpans:
[C#]
var wt =
new WorkingTime(
new TimeSpan(9, 0, 0),
new TimeSpan(18, 0, 0));
- Exceptions
-
| ArgumentException | When toTime less than of equal to toTime argument or when interval between fromTime and toTime is greater than 24 hours. |
◆ WorkingTime() [3/3]
| Aspose::Tasks::WorkingTime::WorkingTime |
( |
int32_t |
fromHours, |
|
|
int32_t |
toHours |
|
) |
| |
Initializes a new instance of the WorkingTime class with an interval item with the specified start and finish times.
- Parameters
-
| fromHours | Interval's start time represented by whole number of hours (0-24). |
| toHours | Interval's end time represented by whole number of hours (0-24). |
The overload of WorkingTime ctor can be used to initialize interval's start and end using whole hours:
- Exceptions
-
| ArgumentException | When toTime less than of equal to toTime argument or when interval between fromTime and toTime is greater than 24 hours. |
◆ Equals()
| bool Aspose::Tasks::WorkingTime::Equals |
( |
System::SharedPtr< System::Object > |
obj | ) |
|
|
override |
Checks that the objects are equal.
- Parameters
-
| obj | Second object to compare. |
- Returns
- True if the objects are equal, false otherwise.
◆ get_From()
| System::DateTime Aspose::Tasks::WorkingTime::get_From |
( |
| ) |
const |
Gets the beginning of a working time.
◆ get_To()
| System::DateTime Aspose::Tasks::WorkingTime::get_To |
( |
| ) |
const |
Gets the end of a working time.
◆ GetHashCode()
| int32_t Aspose::Tasks::WorkingTime::GetHashCode |
( |
| ) |
const |
|
override |
Returns a hash code value for the instance of the WorkingTime class.
- Returns
- returns a hash code value for this object.
WorkingTime(System::DateTime fromTime, System::DateTime toTime)
Initializes a new instance of the WorkingTime class with a interval with the specified start and fini...