TimeSpanRange

StockSharp.Xaml.Charting

Defines a Range of Type TimeSpan

Inherits: Range<TimeSpan>

Constructors

TimeSpanRange
public TimeSpanRange()
timeSpanRange = TimeSpanRange()

Initializes a new instance of the TimeSpanRange class.

TimeSpanRange
public TimeSpanRange(TimeSpan min, TimeSpan max)
timeSpanRange = TimeSpanRange(min, max)

Initializes a new instance of the TimeSpanRange class.

min
The min.
max
The max.

Properties

Diff
public override TimeSpan Diff { get; }
value = timeSpanRange.Diff

Gets the difference (Max - Min) of this range

IsZero
public override bool IsZero { get; }
value = timeSpanRange.IsZero

Gets whether the range is Zero, where Max equals Min

Methods

AsDoubleRange
public override DoubleRange AsDoubleRange()
result = timeSpanRange.AsDoubleRange()

Converts this range to a DoubleRange, which are used internally for calculations

ClipTo
public override IRange<TimeSpan> ClipTo(IRange<TimeSpan> maximumRange)
result = timeSpanRange.ClipTo(maximumRange)

Clips the current IRange to a maxmimum range

maximumRange
The Maximum Range

Returns: This instance, after the operation

Clone
public override object Clone()
result = timeSpanRange.Clone()

Clones this instance.

GrowBy
public override IRange<TimeSpan> GrowBy(double minFraction, double maxFraction)
result = timeSpanRange.GrowBy(minFraction, maxFraction)

Grows the current IRange by the min and max fraction, returning this instance after modification

minFraction
The Min fraction to grow by. For example, Min = -10 and minFraction = 0.1 will result in the new Min = -11
maxFraction
The Max fraction to grow by. For example, Max = 10 and minFraction = 0.2 will result in the new Max = 12

Returns: This instance, after the operation

SetMinMax
public override IRange<TimeSpan> SetMinMax(double min, double max)
result = timeSpanRange.SetMinMax(min, max)

Sets the Min, Max values on the IRange, returning this instance after modification

min
The new Min value.
max
The new Max value.

Returns: This instance, after the operation

SetMinMax
public override IRange<TimeSpan> SetMinMax(double min, double max, IRange<TimeSpan> maxRange)
result = timeSpanRange.SetMinMax(min, max, maxRange)

Sets the Min, Max values on the IRange with a maximum range limit, returning this instance after modification

min
The new Min value.
max
The new Max value.
maxRange
The max range.

Returns: This instance, after the operation

ToString
public override string ToString()
result = timeSpanRange.ToString()

Returns a String that represents this instance.

Returns: A String that represents this instance.