Class EbicsDateRange

Namespace
Subsembly.EBICS
Assembly
Subsembly.EBICS.Core.dll

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

tStart DateTime

The desired start date or DateTime.MinValue to indicate that no start date shall be set. Only the Date of this parameter will be used, the time portion is ignored.

tEnd DateTime

The desired end date or DateTime.MinValue to indicate that no end date shall be set. The value DateTime.MaxValue should not be used here. Only the Date of 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.MinValue indicates 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

bool

Methods

BuildXml(XmlDocument, EbicsVersion)

public override XmlElement BuildXml(XmlDocument xmlDocument, EbicsVersion nVersion)

Parameters

xmlDocument XmlDocument
nVersion EbicsVersion

Returns

XmlElement

IsInRange(DateTime)

Checks whether a given date and time is contained in this date range.

public bool IsInRange(DateTime tDate)

Parameters

tDate DateTime

The date and time that shall be checked. The time portion of this parameter is effectively ignored. Also, the DateTimeKind is ignored.

Returns

bool

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

xmlElement XmlElement
nVersion EbicsVersion