Ejemplo n.º 1
0
 private void OnTripleAsserted(Object sender, TripleEventArgs args)
 {
     if (!this._persisting)
     {
         this._actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple)));
     }
 }
Ejemplo n.º 2
0
 private void OnTripleRetracted(Object sender, TripleEventArgs args)
 {
     if (!_persisting)
     {
         _actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple, true)));
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 5
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)
        {
            TripleEventHandler d = TripleAsserted;

            args.Graph = this;
            if (d != null)
            {
                d(this, args);
            }
            RaiseGraphChanged(args);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 8
0
        /// <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));
                }
            }
        }
Ejemplo n.º 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));
                }
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 17
0
 private void OnTripleRetracted(Object sender, TripleEventArgs args)
 {
     if (!this._persisting)
     {
         this._actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple, true)));
     }
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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) { }
Ejemplo n.º 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);
 }
Ejemplo n.º 24
0
 private void HandleTripleAdded(Object sender, TripleEventArgs args)
 {
     this.RaiseTripleAdded(args.Triple);
 }