private readonly Dictionary<string, Element> _fields; //make a dic #endregion Fields #region Constructors public ElementHistoricFieldData(DateTime date, Dictionary<string, object> values) { this._fields = new Dictionary<string, Element>(); Element elmDate = new ElementHistoricDateTime(date); this._fields.Add(elmDate.Name.ToString().ToUpper(), elmDate); foreach (var item in values) { if (item.Value is double) { Element elmDouble = new ElementHistoricDouble(item.Key.ToUpper(), (double)item.Value); this._fields.Add(elmDouble.Name.ToString(), elmDouble); } } }
private readonly Dictionary <string, Element> _fields; //make a dic public ElementHistoricFieldData(DateTime date, Dictionary <string, object> values) { this._fields = new Dictionary <string, Element>(); Element elmDate = new ElementHistoricDateTime(date); this._fields.Add(elmDate.Name.ToString().ToUpper(), elmDate); foreach (var item in values) { if (item.Value is double) { Element elmDouble = new ElementHistoricDouble(item.Key.ToUpper(), (double)item.Value); this._fields.Add(elmDouble.Name.ToString(), elmDouble); } } }