Range

StockSharp.Xaml.Charting

Abstract base implementation of IRange, used throughout Ultrachart for visible, data and index range calculations

Erbt von: BindableObject

Implementiert: IRange<T>, IRange, ICloneable, INotifyPropertyChanged

Konstruktoren

Range()

Initializes a new instance of the Range class.

Range(T, T)

Initializes a new instance of the Range class.

min
The min value.
max
The max value.

Eigenschaften

Diff : T

Gets the Diff (Max - Min) of this range

IsDefined : bool

Gets whether this Range is defined

IsZero : bool

Gets whether the range is Zero, where Max equals Min

Max : T

Gets or sets the Max value of this range

Min : T

Gets or sets the Min value of this range

StockSharp#Xaml#Charting#IRange#Diff

Gets the difference (Max - Min) of this range

StockSharp#Xaml#Charting#IRange#Max

Gets or sets the Max value of this range

StockSharp#Xaml#Charting#IRange#Min

Gets or sets the Min value of this range

Methoden

AsDoubleRange() : DoubleRange

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

ClipTo(IRange, RangeClipMode) : IRange

Clips the current IRange to a maximum according to clip mode

maximumRange
The maximum range
clipMode
clip mode which defines how to clip range

Rückgabe: This instance, after the operation

ClipTo(IRange) : IRange

Clips the current IRange to a maxmimum range with MinMax mode

maximumRange
The Maximum Range

Rückgabe: This instance, after the operation

ClipTo(IRange<T>) : IRange

Clips the current IRange to a maxmimum range

maximumRange
The Maximum Range

Rückgabe: This instance, after the operation

Clone() : object

Creates a new object that is a copy of the current instance.

Rückgabe: A new object that is a copy of this instance.

Equals(IRange<T>) : bool

Compares Min and Max values to determine whether the specified IRange is equal to this instance.

other
The IRange to compare with the current IRange.

Rückgabe: true if the specified IRange is equal to this instance; otherwise, false.

Equals(object) : bool

Compares Min and Max values to determine whether the specified Object is equal to this instance.

obj
The Object to compare with the current Object.

Rückgabe: true if the specified Object is equal to this instance; otherwise, false.

GetHashCode() : int

Returns a hash code for this instance.

Rückgabe: A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

GrowBy(double, double) : IRange<T>

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

Rückgabe: This instance, after the operation

IsValueWithinRange(IComparable) : bool

Returns True if the value is within the Min and Max of the Range

value
The value to test

Rückgabe: True if the value is within the Min and Max of the Range

SetMinMax(double, double, IRange<T>) : IRange<T>

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.

Rückgabe: This instance, after the operation

SetMinMax(double, double) : IRange<T>

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

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

Rückgabe: This instance, after the operation

SetMinMaxInternal(T, T)

Internal implementation: Sets the Min, Max values of the Range

min
The new Min value
max
The new Max value
StockSharp#Xaml#Charting#IRange#GrowBy(double, double)

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.

Rückgabe: This instance, after the operation

StockSharp#Xaml#Charting#IRange#SetMinMax(double, double)

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

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

Rückgabe: This instance, after the operation

StockSharp#Xaml#Charting#IRange#SetMinMaxWithLimit(double, double, IRange)

Sets the Min, Max values on the IRange with a max range to clip values to, returning this instance after modification

min
The new Min value.
max
The new Max value.
maxRange
The max range, which is used to clip values.

Rückgabe: This instance, after the operation

ToString() : string

Returns the String that represents current IRange.

Rückgabe: A String that represents this instance.

Union(IRange) : IRange<T>

Performs the Union of two IRange instances, returning a new IRange

Union(IRange<T>) : IRange<T>

Performs a Union logical operation between two ranges. The returned IRange has Min = Math.Min(range1.min, range2.min) and Max = Math.Max(range1.Max, range2.Max)

range
The input range to union with this range

Rückgabe: The range result