Exemple #1
0
 public void AddChild(Value value, Node node)
 {
     if (children.ContainsKey (value.AsString ())) {
         this.children [value.AsString ()] = node;
     } else {
         this.children.Add (value.AsString (), node);
     }
 }
Exemple #2
0
        public Data(List<Attribute> attributes, string data)
        {
            Values = new Dictionary<string, Value> ();
            var values = data
                .Split (new char[] {','}, StringSplitOptions.None)
                .Select(x => x.Trim()).ToList();

            for (int i = 0; i < attributes.Count-1; i++) {
                Values.Add (attributes [i].Name, new Value (values [i]));
            }

            Target = new Value (values.Last());
        }
Exemple #3
0
 public Leaf(Value decision)
 {
     this.decision = decision;
 }