Exemplo n.º 1
0
 /// <summary>
 /// Rebuild the metadata of the given graph
 /// </summary>
 internal static void RebuildGraph(RDFGraph graph) {
     var triples = new Dictionary<Int64, RDFTriple>(graph.Triples);
     graph.ClearTriples();
     foreach (var t in triples) {
         graph.AddTriple(t.Value);
     }
 }
        public void ClearTriplesTest()
        {
            var testGraph = new RDFGraph(defaultTriples);
            var old       = new List <RDFTriple>(defaultTriples);

            old.Clear();
            testGraph.ClearTriples();
            var newList = new List <RDFTriple>();

            Assert.Equal(old, newList);
        }