Exemple #1
0
        public NodeAssociation(string name, string keyNode, IList <string> path, NodeFilterFunction filter)
        {
            this.Name       = name;
            this.Filter     = filter;
            this.Expression = null;

            this.KeyNode = keyNode ?? string.Empty;
            var thisPath = new string[path.Count];

            for (var i = 0; i < path.Count; i++)
            {
                thisPath[i] = path[i];
            }

            this.Path = thisPath;
        }
Exemple #2
0
        public NodeAssociation(string name, string path, NodeFilterFunction filter)
        {
            this.Name       = name;
            this.Filter     = filter;
            this.Expression = null;

            var parts = path.Split('.');

            if (parts.Length < 2)
            {
                throw new ArgumentException("Invalid path: missing root");
            }

            this.KeyNode = parts[0];
            var thisPath = new string[parts.Length - 1];

            Array.Copy(parts, 1, thisPath, 0, thisPath.Length);

            this.Path = thisPath;
        }
Exemple #3
0
 public void AddAssociation(string name, string path, NodeFilterFunction filter)
 {
     _Associations.Add(new NodeAssociation(name, path, filter));
 }