Class Period
- Namespace
- Arc4u
- Assembly
- Arc4u.dll
Represents a period. This class cannot be inherited.
public sealed class Period : Interval<DateTimeOffset?>, IEquatable<Interval<DateTimeOffset?>>, IComparable<Interval<DateTimeOffset?>>, IFormattable
- Inheritance
-
Period
- Implements
- Inherited Members
Constructors
Period(Bound<DateTimeOffset?>, Bound<DateTimeOffset?>)
Initializes a new instance of the Period class.
[JsonConstructor]
public Period(Bound<DateTimeOffset?> lowerBound, Bound<DateTimeOffset?> upperBound)
Parameters
lowerBoundBound<DateTimeOffset?>The lower bound.
upperBoundBound<DateTimeOffset?>The upper bound.
Period(DateTimeOffset?, DateTimeOffset?)
Initializes a new instance of the Period class
with an included lowerValue and an excluded upperValue.
public Period(DateTimeOffset? lowerValue, DateTimeOffset? upperValue)
Parameters
lowerValueDateTimeOffset?The lower value.
upperValueDateTimeOffset?The upper value.
Period(DateTimeOffset?, DateTimeOffset?, bool)
Initializes a new instance of the Period class
with an included lowerValue.
public Period(DateTimeOffset? lowerValue, DateTimeOffset? upperValue, bool upperIncluded)
Parameters
lowerValueDateTimeOffset?The lower value.
upperValueDateTimeOffset?The upper value.
upperIncludedbooltrueif theupperValueis included in the Period; otherwise,false.
Period(DateTimeOffset?, DateTimeOffset?, bool, bool)
Initializes a new instance of the Period class.
public Period(DateTimeOffset? lowerValue, DateTimeOffset? upperValue, bool lowerIncluded, bool upperIncluded)
Parameters
lowerValueDateTimeOffset?The lower value.
upperValueDateTimeOffset?The upper value.
lowerIncludedbooltrueif thelowerValueis included in the Period; otherwise,false.upperIncludedbooltrueif theupperValueis included in the Period; otherwise,false.
Methods
ToString(IFormatProvider)
Converts the value of the current Period object to its equivalent string representation using the specified culture-specific format information.
public string ToString(IFormatProvider formatProvider)
Parameters
formatProviderIFormatProviderAn IFormatProvider object that supplies culture-specific formatting information.
Returns
- string
A string representation of the value of the current Period object, as specified by
formatProvider.
ToString(string)
Converts the value of the current Period object to its equivalent string representation using the specified format information.
public string ToString(string format)
Parameters
formatstringA format string.
Returns
ToString(string?, IFormatProvider?)
Converts the value of the current Period object to its equivalent string representation using the specified format and culture-specific format information.
public string ToString(string? format, IFormatProvider? formatProvider)
Parameters
formatstringA format string.
formatProviderIFormatProviderAn IFormatProvider object that supplies culture-specific formatting information.