private void OnTripleAsserted(Object sender, TripleEventArgs args) { if (!this._persisting) { this._actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple))); } }
private void OnTripleRetracted(Object sender, TripleEventArgs args) { if (!_persisting) { _actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple, true))); } }
/// <summary> /// Helper method for raising the <see cref="TripleRetracted">Triple Retracted</see> event manually. /// </summary> /// <param name="args"></param> protected void RaiseTripleRetracted(TripleEventArgs args) { var d = TripleRetracted; args.Graph = this; d?.Invoke(this, args); RaiseGraphChanged(args); }
/// <summary> /// Helper method for raising the <see cref="Changed">Changed</see> event /// </summary> /// <param name="args">Triple Event Arguments</param> protected void RaiseGraphChanged(TripleEventArgs args) { GraphEventHandler d = this.Changed; if (d != null) { d(this, new GraphEventArgs(this, args)); } }
/// <summary> /// Helper method for raising the <see cref="TripleAsserted">Triple Asserted</see> event manually /// </summary> /// <param name="args">Triple Event Arguments</param> protected void RaiseTripleAsserted(TripleEventArgs args) { TripleEventHandler d = TripleAsserted; args.Graph = this; if (d != null) { d(this, args); } RaiseGraphChanged(args); }
/// <summary> /// Helper method for raising the <see cref="TripleRetracted">Triple Retracted</see> event manually /// </summary> /// <param name="args"></param> protected void RaiseTripleRetracted(TripleEventArgs args) { TripleEventHandler d = this.TripleRetracted; args.Graph = this; if (d != null) { d(this, args); } this.RaiseGraphChanged(args); }
/// <summary> /// Helper method for raising the <see cref="TripleRetracted">Triple Retracted</see> event manually. /// </summary> /// <param name="t">Triple.</param> protected void RaiseTripleRetracted(Triple t) { var d = TripleRetracted; var e = Changed; if (d != null || e != null) { var args = new TripleEventArgs(t, this, false); d?.Invoke(this, args); e?.Invoke(this, new GraphEventArgs(this, args)); } }
/// <summary> /// Helper method for raising the <see cref="TripleAsserted">Triple Asserted</see> event manually /// </summary> /// <param name="t">Triple</param> protected void RaiseTripleAsserted(Triple t) { TripleEventHandler d = TripleAsserted; GraphEventHandler e = Changed; if (d != null || e != null) { TripleEventArgs args = new TripleEventArgs(t, this); if (d != null) { d(this, args); } if (e != null) { e(this, new GraphEventArgs(this, args)); } } }
/// <summary> /// Helper method for raising the <see cref="TripleRetracted">Triple Retracted</see> event manually /// </summary> /// <param name="t">Triple</param> protected void RaiseTripleRetracted(Triple t) { TripleEventHandler d = this.TripleRetracted; GraphEventHandler e = this.Changed; if (d != null || e != null) { TripleEventArgs args = new TripleEventArgs(t, this, false); if (d != null) { d(this, args); } if (e != null) { e(this, new GraphEventArgs(this, args)); } } }
/// <summary> /// Event Handler which handles the <see cref="BaseTripleCollection.TripleAdded">Triple Added</see> event from the underlying Triple Collection by raising the Graph's <see cref="TripleAsserted">TripleAsserted</see> event. /// </summary> /// <param name="sender">Sender.</param> /// <param name="args">Triple Event Arguments.</param> protected virtual void OnTripleAsserted(Object sender, TripleEventArgs args) { RaiseTripleAsserted(args); }
/// <summary> /// Event Handler which handles the <see cref="BaseTripleCollection.TripleRemoved">Triple Removed</see> event from the underlying Triple Collection by raising the Graph's <see cref="TripleRetracted">Triple Retracted</see> event /// </summary> /// <param name="sender">Sender</param> /// <param name="args">Triple Event Arguments</param> protected virtual void OnTripleRetracted(Object sender, TripleEventArgs args) { this.RaiseTripleRetracted(args); }
/// <summary> /// Helper method for raising the <see cref="TripleRetracted">Triple Retracted</see> event manually /// </summary> /// <param name="t">Triple</param> protected void RaiseTripleRetracted(Triple t) { TripleEventHandler d = this.TripleRetracted; GraphEventHandler e = this.Changed; if (d != null || e != null) { TripleEventArgs args = new TripleEventArgs(t, this, false); if (d != null) d(this, args); if (e != null) e(this, new GraphEventArgs(this, args)); } }
/// <summary> /// Helper method for raising the <see cref="Changed">Changed</see> event. /// </summary> /// <param name="args">Triple Event Arguments.</param> protected void RaiseGraphChanged(TripleEventArgs args) { Changed?.Invoke(this, new GraphEventArgs(this, args)); }
private void OnTripleRetracted(Object sender, TripleEventArgs args) { if (!this._persisting) { this._actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple, true))); } }
/// <summary> /// Creates a new set of Cancellable Graph Event Arguments /// </summary> /// <param name="g">Graph</param> /// <param name="args">Triple Event Arguments</param> public CancellableGraphEventArgs(IGraph g, TripleEventArgs args) : base(g, args) { }
/// <summary> /// Creates a new set of Graph Event Arguments /// </summary> /// <param name="g">Graph</param> /// <param name="args">Triple Event Arguments</param> public GraphEventArgs(IGraph g, TripleEventArgs args) : this(g) { this._args = args; }
private void HandleTripleRemoved(Object sender, TripleEventArgs args) { RaiseTripleRemoved(args.Triple); }
/// <summary> /// Helper method for raising the <see cref="TripleAsserted">Triple Asserted</see> event manually. /// </summary> /// <param name="args">Triple Event Arguments.</param> protected void RaiseTripleAsserted(TripleEventArgs args) { args.Graph = this; TripleAsserted?.Invoke(this, args); RaiseGraphChanged(args); }
private void HandleTripleAdded(Object sender, TripleEventArgs args) { this.RaiseTripleAdded(args.Triple); }