17 using System.Reflection;
19 using System.Collections;
20 using System.Collections.Generic;
55 return $
"{EndTime} {string.Join(",
", GetStorageDictionary().OrderBy(x => x.Key).Select(x => $"{x.Key}: {HandleObjectStorage(x.Value)}
"))}";
65 return instance.
Value;
68 private static string HandleObjectStorage(
object storedObject)
72 return point.Value.SmartRounding().ToStringInvariant();
74 return storedObject?.ToString() ??
string.Empty;
86 public string Name {
get; }
91 public List<IndicatorDataPoint>
Values {
get; }
130 return new IndicatorPropertyValues(indicator, propertyInfo);
138 return $
"{Name} {Values.Count} indicator values";
146 return ((IEnumerable<IndicatorDataPoint>)
Values).GetEnumerator();
149 IEnumerator IEnumerable.GetEnumerator()
151 return ((IEnumerable)
Values).GetEnumerator();
156 private readonly PropertyInfo _currentInfo;
157 private readonly PropertyInfo _propertyInfo;
158 public IndicatorPropertyValues(IIndicator indicator, PropertyInfo propertyInfo) : base(indicator, propertyInfo.
Name)
160 _propertyInfo = propertyInfo;
161 _currentInfo = _propertyInfo.PropertyType.GetProperty(
"Current");
165 var value = _propertyInfo.GetValue(
Indicator);
166 if (_currentInfo !=
null)
168 value = _currentInfo.GetValue(value);
170 var point = value as IndicatorDataPoint;