Exemple #1
0
        // 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);
        });
Exemple #2
0
 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();
     //});
 }
Exemple #3
0
 public Ref(FalcorPath path)
 {
     _path = path;
 }
Exemple #4
0
 public bool Contains(FalcorPath path) => Get(path) != null;
Exemple #5
0
 public bool Contains(FalcorPath path) => Cache.Contains(path);