EnumerableExtensions
StockSharp.Xaml.Charting.Common.Extensions
Methods
EnumerateUntilGap
private static IEnumerable<Tuple<Point, Point>> EnumerateUntilGap(IEnumerator<Tuple<Point, Point>> iterator)
result = EnumerableExtensions.EnumerateUntilGap(iterator)
- iterator
- must be set to first non-NaN point in collection
EnumerateUntilNonGap
private static bool EnumerateUntilNonGap(IEnumerator<Tuple<Point, Point>> iterator)
result = EnumerableExtensions.EnumerateUntilNonGap(iterator)
- iterator
- must be set to first NaN point in collection
FindIndex
public static int FindIndex(IList list, bool isSorted, IComparable value, SearchMode searchMode)
result = EnumerableExtensions.FindIndex(list, isSorted, value, searchMode)
Finds the index of the item in the List according to the desired SearchMode. If is true, uses fast binary search
- list
- The list to search
- isSorted
- If true, will use fast binary search
- value
- The value to find the index for
- searchMode
- The SearchMode options
Returns: The found index, or -1 if not found
FindIndex``1
public static int FindIndex<T>(IList<T> list, bool isSorted, IComparable value, SearchMode searchMode)
result = EnumerableExtensions.FindIndex(list, isSorted, value, searchMode)
Finds the index of the item in the List according to the desired SearchMode. If is true, uses fast binary search
- list
- The list to search
- isSorted
- If true, will use fast binary search
- value
- The value to find the index for
- searchMode
- The SearchMode options
Returns: The found index, or -1 if not found
MaxOrNullable``1
public static T? MaxOrNullable<T>(IEnumerable<T> that)
result = EnumerableExtensions.MaxOrNullable(that)
Returns the maximum value or null if sequence is empty.
- that
- The sequence to retrieve the maximum value from.
Returns: The maximum value or null.
MinOrNullable``1
public static T? MinOrNullable<T>(IEnumerable<T> that)
result = EnumerableExtensions.MinOrNullable(that)
Returns the minimum value or null if sequence is empty.
- that
- The sequence to retrieve the minimum value from.
Returns: The minimum value or null.
SplitToSinglePointInfo
internal static IEnumerable<SeriesInfo> SplitToSinglePointInfo(IEnumerable<SeriesInfo> infos)
result = EnumerableExtensions.SplitToSinglePointInfo(infos)
Splits single BandSeriesInfo onto two instances in order to siplify working with SeriesInfo collections
- infos
ToUncheckedList``1
internal static T[] ToUncheckedList<T>(IList<T> list)
result = EnumerableExtensions.ToUncheckedList(list)
Returns: warning: returned array may contain padding zeros in end