private void OnTripleAsserted(Object sender, TripleEventArgs args)
 {
     if (!this._persisting)
     {
         this._actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple)));
     }
 }
Exemple #2
0
 private void OnTripleRetracted(Object sender, TripleEventArgs args)
 {
     if (!_persisting)
     {
         _actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple, true)));
     }
 }
Exemple #3
0
        /// <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);
        }
Exemple #4
0
        /// <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);
        }
Exemple #6
0
        /// <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);
        }
Exemple #7
0
        /// <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));
                }
            }
        }
Exemple #9
0
        /// <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));
                }
            }
        }
Exemple #10
0
 /// <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);
 }
Exemple #11
0
 /// <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);
 }
Exemple #12
0
 /// <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));
     }
 }
Exemple #13
0
 /// <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));
     }
 }
Exemple #14
0
 /// <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);
 }
Exemple #15
0
 /// <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);
 }
Exemple #16
0
 /// <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)));
     }
 }
Exemple #18
0
 /// <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)
 {
 }
Exemple #19
0
 /// <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);
 }
Exemple #21
0
 /// <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;
 }
Exemple #22
0
 /// <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) { }
Exemple #23
0
 /// <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);
 }