Click or drag to resize
IDfsEqCalendarAxis Interface
Equidistant calendar axis.

Namespace: DHI.Generic.MikeZero.DFS
Assembly: DHI.Generic.MikeZero.DFS (in DHI.Generic.MikeZero.DFS.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax
public interface IDfsEqCalendarAxis : IDfsTemporalAxis

The IDfsEqCalendarAxis type exposes the following members.

Properties
  NameDescription
Public propertyFirstTimeStepIndex
Index of first time step. Currently not used, always zero.
(Inherited from IDfsTemporalAxis.)
Public propertyNumberOfTimeSteps
Number of time steps in the file
(Inherited from IDfsTemporalAxis.)
Public propertyStartDateTime
Start time of the file.
Public propertyStartTimeOffset
Start time in TimeUnit for the first time step in the file.
Public propertyTimeAxisType
Time axis type. Based on this, the class must implement one of the sub-types.
(Inherited from IDfsTemporalAxis.)
Public propertyTimeStep
Time step length, in unit described by TimeUnit
Public propertyTimeUnit
Unit of time axis.
(Inherited from IDfsTemporalAxis.)
Top
Extension Methods
  NameDescription
Public Extension MethodEndDateTime
Get the end date time for an equidistant calendar axis.
(Defined by DfsExtensions.)
Public Extension MethodGetDateTimesOverloaded.
Return an array of DateTimes which are the times for each timestep.

For non-equidistant axis, only the first and the last time are populated correctly. The rest are populated with MinValue.

For time type axis, first time is StartTimeOffsetInSeconds(IDfsTemporalAxis) after MinValue.

(Defined by DfsExtensions.)
Public Extension MethodGetDateTimesOverloaded.
Return an array of DateTimes which are the times for each timestep
(Defined by DfsExtensions.)
Public Extension MethodGetRelativeSeconds
Return an array of doubles which are the the number of seconds since the start time for each timestep.

For non-equidistant axis, only the first and the last time are populated correctly. The rest are populated with -1

For time type axis, first time is StartTimeOffsetInSeconds(IDfsTemporalAxis)

(Defined by DfsExtensions.)
Public Extension MethodIsCalendar
Returns true if the temporal axis is a calendar axis
(Defined by DfsExtensions.)
Public Extension MethodIsEquidistant
Returns true if the temporal axis is equidistant.
(Defined by DfsExtensions.)
Public Extension MethodStartTimeOffsetInSeconds
Return the start time offset in seconds
(Defined by DfsExtensions.)
Public Extension MethodTimeSpan
Time span of all data in file, in unit described by TimeUnit.

The StartTimeOffset is not included in the span. The span starts at the time of the StartTimeOffset

Convenience method that returns/calculates the time span consistently for all types of time axes,

(Defined by DfsExtensions.)
Public Extension MethodTimeSpanAsTimeSpan
Calculate the time span as a System.TimeSpan
(Defined by DfsExtensions.)
Public Extension MethodTimeSpanInSeconds
Calculate the time span in seconds
(Defined by DfsExtensions.)
Public Extension MethodTimeStepInSecondsOverloaded.
Calculate the time step in seconds for an equidistant temporal axis.

If the time axis is not equidistant, zero is returned.

If the time axis unit can not be converted to seconds, an exception is thrown

(Defined by DfsExtensions.)
Public Extension MethodTimeStepInSecondsOverloaded.
Calculate the time step in seconds for an equidistant calendar axis

If the time axis unit can not be converted to seconds, an exception is thrown

(Defined by DfsExtensions.)
Public Extension MethodToDateTime
Returns the relativeTime as a DateTime. The time axis must be a calendar type axis.
(Defined by DfsExtensions.)
Public Extension MethodToRelativeSeconds
Returns the dateTime in relative seconds from the start time of the time axis, in the unit used by the file. The time axis must be a calendar type axis.

Note that for the equidistant axes, the first time step may be offset (see StartTimeOffset), however the time returned here is relative to the start time and not the first time step. This is matching the time returned by the read methods (Time).

(Defined by DfsExtensions.)
Public Extension MethodToRelativeTime(Double)Overloaded.
Converts a time value in seconds to a time value in the unit of the temporal axis.
(Defined by DfsExtensions.)
Public Extension MethodToRelativeTime(DateTime)Overloaded.
Returns the dateTime in relative time from the start time of the time axis, in the unit used by the file. The time axis must be a calendar type axis.

Note that for the equidistant axes, the first time step may be offset (see StartTimeOffset), however the time returned here is relative to the start time and not the first time step. This is matching the time returned by the read methods (Time).

(Defined by DfsExtensions.)
Public Extension MethodToSeconds
Converts a time value in the unit of the temporal axis (TimeUnit) to a time value in seconds.
(Defined by DfsExtensions.)
Public Extension MethodToSecondsFactor
Returns a factor for converting from a time value in the specified time unit to a time value in seconds.

For month and year time units, the factor is not uniquely defined, and may not return the value you want to use.

(Defined by DfsExtensions.)
Top
See Also