public override void Add(string key, HaystackValue value) { throw new InvalidOperationException("Cannot add values to a row as it will affect the entire grid"); }
public static HVal Map(HaystackValue value) { if (value == null) { return(null); } if (value is HaystackBinary bin) { return(new HBin(bin)); } if (value is HaystackBoolean @bool) { return(new HBool(@bool)); } if (value is HaystackCoordinate coord) { return(new HCoord(coord)); } if (value is HaystackDate date) { return(new HDate(date)); } if (value is HaystackDateTime dateTime) { return(new HDateTime(dateTime)); } if (value is HaystackDefinition def) { return(new HDef(def)); } if (value is HaystackDictionary dict) { return(new HDict(dict)); } if (value is HaystackGrid grid) { return(new HGrid(grid)); } if (value is HaystackHistoryItem hisItem) { return(new HHisItem(hisItem)); } if (value is HaystackList list) { return(new HList(list)); } if (value is HaystackMarker marker) { return(new HMarker(marker)); } if (value is HaystackNotAvailable na) { return(new HNA(na)); } if (value is HaystackNumber num) { return(new HNum(num)); } if (value is HaystackReference @ref) { return(new HRef(@ref)); } if (value is HaystackRemove remove) { return(new HRemove(remove)); } if (value is HaystackRow row) { return(new HRow(row)); } if (value is HaystackString str) { return(new HStr(str)); } if (value is HaystackTime time) { return(new HTime(time)); } if (value is HaystackUri uri) { return(new HUri(uri)); } if (value is HaystackXString xstr) { return(new HXStr(xstr)); } throw new InvalidOperationException($"Cannot map value of type {value.GetType().Name}"); }
public HaystackHistoryItem(HaystackDateTime timeStamp, HaystackValue Value) { TimeStamp = timeStamp ?? throw new ArgumentNullException(nameof(timeStamp)); this.Value = Value ?? throw new ArgumentNullException(nameof(Value)); }