// public T Aggregate<T>(Func<FalcorValue, T> f1, Func<IDictionary<KeySegment, T>, T> f2) public FalcorValue Get(FalcorPath path) => Match(value => value, tree => { FalcorNode child; //jif (!(path.IsEmpty() || !tree.Children.TryGetValue(path.First(), out child))) //return child.Get(path); return(null); });
public FalcorNode Put(FalcorPath path, FalcorValue newValue) { throw new NotImplementedException(); //if (path.IsEmpty()) throw new ArgumentException($"{nameof(path)} is empty"); //return Match(value => //{ // throw new InvalidOperationException("put on value node"); //}, tree => //{ // var head = path.First(); //}); }
public Ref(FalcorPath path) { _path = path; }
public bool Contains(FalcorPath path) => Get(path) != null;
public bool Contains(FalcorPath path) => Cache.Contains(path);