예제 #1
0
        /// <inheritdoc />
        public override IDatasetChange MergeWith(IDatasetChange other)
        {
            if (other is GraphReconstruct)
            {
                return(other);
            }

            var otherUpdate       = (GraphUpdate)other;
            var removalsCombined  = RemovedQuads.Union(otherUpdate.RemovedQuads);
            var additionsCombined = AddedQuads.Union(otherUpdate.AddedQuads);

            return(new GraphUpdate(Entity, Graph, removalsCombined.ToArray(), additionsCombined.ToArray()));
        }
예제 #2
0
 /// <summary>Returns a description of the change.</summary>
 public override string ToString()
 {
     return(string.Format("Recreating graph {0} with {1} triples", Graph, AddedQuads.Count()));
 }