Class EbicsDateRange
Holds an EBICS DateRange element.
public class EbicsDateRange : EbicsElement
- Inheritance
-
EbicsDateRange
- Inherited Members
Constructors
EbicsDateRange()
Creates an empty date range.
public EbicsDateRange()
EbicsDateRange(DateTime, DateTime)
Creates a particular date range.
public EbicsDateRange(DateTime tStart, DateTime tEnd)
Parameters
tStartDateTimeThe desired start date or
DateTime.MinValueto indicate that no start date shall be set. Only theDateof this parameter will be used, the time portion is ignored.tEndDateTimeThe desired end date or
DateTime.MinValueto indicate that no end date shall be set. The valueDateTime.MaxValueshould not be used here. Only theDateof this parameter will be used, the time portion is ignored.
Exceptions
- ArgumentException
Thrown if the given date range is invalid.
Properties
DateRangeEnd
Optional end of a requested date range.
public DateTime DateRangeEnd { get; }
Property Value
- DateTime
The value
DateTime.MinValueindicates that no end date is set.
DateRangeStart
Optional start of a requested date range.
public DateTime DateRangeStart { get; }
Property Value
- DateTime
The value DateTime.MinValue indicates that no start date is set.
HaveRange
Indicates whether both DateRangeStart and DateRangeEnd
have been set to a value that is not DateTime.MinValue.
public bool HaveRange { get; }
Property Value
Methods
BuildXml(XmlDocument, EbicsVersion)
public override XmlElement BuildXml(XmlDocument xmlDocument, EbicsVersion nVersion)
Parameters
xmlDocumentXmlDocumentnVersionEbicsVersion
Returns
IsInRange(DateTime)
Checks whether a given date and time is contained in this date range.
public bool IsInRange(DateTime tDate)
Parameters
tDateDateTimeThe date and time that shall be checked. The time portion of this parameter is effectively ignored. Also, the
DateTimeKindis ignored.
Returns
Remarks
The comparison fully ignores theDateTime.Kind and thus may compare
different time zones wrongly.
ParseXml(XmlElement, EbicsVersion)
public override void ParseXml(XmlElement xmlElement, EbicsVersion nVersion)
Parameters
xmlElementXmlElementnVersionEbicsVersion