private bool ClearTable(TriggerReader reader) { var var = reader.ReadVariableTable(); var.Clear(); return(true); }
private bool GetTableKeyIntoVar(TriggerReader reader) { var var = reader.ReadVariableTable(); var key = reader.ReadString(); var into = reader.ReadVariable(true); into.Value = var[key]; return(true); }
private bool PutNumIntoTable(TriggerReader reader) { var var = reader.ReadVariableTable(true); var value = reader.ReadNumber(); var key = reader.ReadString(); var.Add(key, value); return(true); }
private bool GetAllLoadedLibrariesIntoTable(TriggerReader reader) { var table = reader.ReadVariableTable(true); foreach (var lib in reader.Page.Libraries) { table.Add(lib.GetType().Name); } return(true); }
private bool ForEntryInTable(TriggerReader reader) { var table = reader.ReadVariableTable(); var var = reader.ReadVariable(true); if (!table.Next(out object keyVal)) { reader.Page.RemoveVariable(var); return(false); } var.Value = keyVal; return(true); }
private bool ForKeyValueInTable(TriggerReader reader) { var table = reader.ReadVariableTable(); var key = reader.ReadVariable(true); var val = reader.ReadVariable(true); if (!table.Next(out object keyVal)) { reader.Page.RemoveVariable(key); reader.Page.RemoveVariable(val); return(false); } key.Value = table.ActiveIndexer; val.Value = keyVal; return(true); }
private bool GetAllTimeZones(TriggerReader reader) { var table = reader.ReadVariableTable(true); try { foreach (var tz in TimeZoneInfo.GetSystemTimeZones()) { table.Add(tz.DisplayName, tz.Id); } } catch (Exception ex) { Logger.Debug <Timers>(ex); reader.Page.RemoveVariable(table); return(false); } return(true); }
private bool CreateTable(TriggerReader reader) { reader.ReadVariableTable(true); return(true); }