예제 #1
0
 /// <summary>
 /// Gets the value of a symbol from the table
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="scope"></param>
 /// <param name="table"></param>
 /// <param name="key"></param>
 /// <returns></returns>
 private void Set <T>(Scope scope, StratusSymbolTable table, string key, T value)
 {
     try
     {
         table.SetValue(key, value);
     }
     catch (KeyNotFoundException e)
     {
         throw new KeyNotFoundException($"{name} : {e.Message}");
     }
 }
예제 #2
0
 //----------------------------------------------------------------------/
 // Methods
 //----------------------------------------------------------------------/
 /// <summary>
 /// Gets the value of a symbol from the table
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="scope"></param>
 /// <param name="table"></param>
 /// <param name="key"></param>
 /// <returns></returns>
 private T Get <T>(Scope scope, StratusSymbolTable table, string key)
 {
     try
     {
         T value = table.GetValue <T>(key);
         return(value);
     }
     catch (KeyNotFoundException e)
     {
         throw new KeyNotFoundException($"{name} : {e.Message}");
     }
 }