Exemple #1
0
 public static IESObject GetProperty(ESTable table, string name)
 {
     if (name == "add")
     {
         return(ToVirtual(new Action <string, object>((k, v) => table.Add(k, ToVirtual(v)))));
     }
     else if (name == "remove")
     {
         return(ToVirtual(new Action <string>(k => table.Remove(k))));
     }
     else if (name == "clear")
     {
         return(ToVirtual(new Action(table.Clear)));
     }
     else if (name == "keys")
     {
         return(ToVirtual(table.Keys));
     }
     else if (name == "values")
     {
         return(ToVirtual(table.Values));
     }
     else if (name == "count")
     {
         return(new ESNumber(table.Count));
     }
     else
     {
         return(new ESKey(table, name));
     }
 }