Esempio n. 1
0
        private void OnGraphRemoved(Object sender, TripleStoreEventArgs args)
        {
            if (args.GraphEvent != null)
            {
                IGraph g = args.GraphEvent.Graph;
                if (g != null)
                {
                    //Ignore Changes to self
                    if (ReferenceEquals(g, this))
                    {
                        return;
                    }

                    if (this._graphs == null)
                    {
                        //No specific Graphs so any change causes an invalidation
                        this.InvalidateView();
                    }
                    else
                    {
                        //If specific Graphs only invalidate when those Graphs change
                        if (this._graphs.Contains(g.BaseUri.ToSafeString()))
                        {
                            this.InvalidateView();
                        }
                    }
                }
            }
        }
Esempio n. 2
0
 public void HandleGraphRemoved(Object sender, TripleStoreEventArgs args)
 {
     this._graphRemoved = true;
     Console.WriteLine("GraphRemoved event occurred on a " + sender.GetType().Name + " instance");
     TestTools.ShowGraph(args.GraphEvent.Graph);
     Console.WriteLine();
 }
Esempio n. 3
0
 public void HandleGraphChanged(Object sender, TripleStoreEventArgs args)
 {
     this._graphChanged = true;
     Console.WriteLine("GraphChanged event occurred on a " + sender.GetType().Name + " instance");
     if (args.GraphEvent != null && args.GraphEvent.TripleEvent != null)
     {
         Console.WriteLine("  Event was a Triple Event");
         Console.WriteLine("  " + args.GraphEvent.TripleEvent.Triple.ToString());
         Console.WriteLine((args.GraphEvent.TripleEvent.WasAsserted ? "  Triple was asserted" : "  Triple was retracted"));
     }
     Console.WriteLine();
 }
Esempio n. 4
0
        private void OnGraphRemoved(Object sender, TripleStoreEventArgs args)
        {
            if (args.GraphEvent != null)
            {
                IGraph g = args.GraphEvent.Graph;
                if (g != null)
                {
                    //Ignore Changes to self
                    if (ReferenceEquals(g, this)) return;

                    if (this._graphs == null)
                    {
                        //No specific Graphs so any change causes an invalidation
                        this.InvalidateView();
                    }
                    else
                    {
                        //If specific Graphs only invalidate when those Graphs change
                        if (this._graphs.Contains(g.BaseUri.ToSafeString()))
                        {
                            this.InvalidateView();
                        }
                    }
                }
            }
        }