/// <summary> /// Helper method for raising the <see cref="GraphMerged">Graph Merged</see> event manually /// </summary> /// <param name="args">Graph Event Arguments</param> protected void RaiseGraphMerged(GraphEventArgs args) { TripleStoreEventHandler d = this.GraphMerged; if (d != null) { d(this, new TripleStoreEventArgs(this, args)); } }
/// <summary> /// Helper method for raising the <see cref="GraphChanged">Graph Changed</see> event manually /// </summary> /// <param name="g">Graph</param> protected void RaiseGraphChanged(IGraph g) { TripleStoreEventHandler d = this.GraphChanged; if (d != null) { d(this, new TripleStoreEventArgs(this, g)); } }
/// <summary> /// Helper method for raising the <see cref="GraphRemoved">Graph Removed</see> event manually /// </summary> /// <param name="args">Graph Event Arguments</param> protected void RaiseGraphRemoved(GraphEventArgs args) { TripleStoreEventHandler d = this.GraphRemoved; if (d != null) { d(this, new TripleStoreEventArgs(this, args)); } this.DetachEventHandlers(args.Graph); }
/// <summary> /// Helper method for raising the <see cref="GraphRemoved">Graph Removed</see> event manually /// </summary> /// <param name="g">Graph</param> protected void RaiseGraphRemoved(IGraph g) { TripleStoreEventHandler d = this.GraphRemoved; if (d != null) { d(this, new TripleStoreEventArgs(this, g)); } this.DetachEventHandlers(g); }
/// <summary> /// Helper method for raising the <see cref="GraphAdded">Graph Added</see> event manually. /// </summary> /// <param name="args">Graph Event Arguments.</param> protected void RaiseGraphAdded(GraphEventArgs args) { TripleStoreEventHandler d = GraphAdded; if (d != null) { d(this, new TripleStoreEventArgs(this, args)); } AttachEventHandlers(args.Graph); }
/// <summary> /// Helper method for raising the <see cref="GraphAdded">Graph Added</see> event manually. /// </summary> /// <param name="g">Graph.</param> protected void RaiseGraphAdded(IGraph g) { TripleStoreEventHandler d = GraphAdded; if (d != null) { d(this, new TripleStoreEventArgs(this, g)); } AttachEventHandlers(g); }
/// <summary> /// Creates a new triple store decorator around the given <see cref="ITripleStore"/> instance /// </summary> /// <param name="store">Triple Store</param> public WrapperTripleStore(ITripleStore store) { if (store == null) { throw new ArgumentNullException("store"); } this._store = store; this.GraphAddedHandler = new TripleStoreEventHandler(this.OnGraphAdded); this.GraphRemovedHandler = new TripleStoreEventHandler(this.OnGraphRemoved); this.GraphChangedHandler = new TripleStoreEventHandler(this.OnGraphChanged); this.GraphMergedHandler = new TripleStoreEventHandler(this.OnGraphMerged); this.GraphClearedHandler = new TripleStoreEventHandler(this.OnGraphCleared); this._store.GraphAdded += this.GraphAddedHandler; this._store.GraphChanged += this.GraphChangedHandler; this._store.GraphCleared += this.GraphClearedHandler; this._store.GraphMerged += this.GraphMergedHandler; this._store.GraphRemoved += this.GraphRemovedHandler; }