public static void Load <T>(this ISymbolTable table, string data) where T : ISymbol { var symbols = JsonConvert.DeserializeObject <IList <T> >(data); foreach (var symbol in symbols) { table.Add(symbol); } }
public void InitializeVariable(ISymbolTable symbolTable, Guid questionId) { symbolTable.Add(questionId, default(int)); }
} // end IsDefined method. //--- add a symbol to the current scope. //--- returns false if name already in current table. public bool Add(ISymbol symbol) { return(symbols.Add(symbol)); }