public void OnNext(double value) { if (stop == true && list.N > 0) { this.Stopped?.Invoke(); } else { list.Update(value); } }
public static Stats Stats <T>(this IEnumerable <T> input) where T : IConvertible { Stats result = new Stats(); foreach (var item in input) { var converted = Convert.ToDouble(item); result.Update(converted); } return(result); }