Example #1
0
        /// <summary>
        /// Assert a series of quads.
        /// Returns the starting point for the set.
        /// </summary>
        public Node <UriOrBlank> AddList(Node <UriOrBlank> root, params Node?[] items)
        {
            if (!items.Any())
            {
                return(root);
            }

            var cur = root;

            for (var i = 0; i < items.Length; i++)
            {
                var next = i == items.Length - 1 ?
                           (Node <UriOrBlank>)_nil :
                           _f.Blank(_owner.Id);

                _owner.Assert(cur, _first, items[i] ?? _nil)
                .Assert(cur, _next, next);

                cur = next;
            }

            return(root);
        }
Example #2
0
 /// <inheritdoc />
 public BlankNode Blank(Node <UriOrBlank> scope)
 => _factory.Blank(scope);