Пример #1
0
 private void OnTripleAsserted(Object sender, TripleEventArgs args)
 {
     if (!this._persisting)
     {
         this._actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple)));
     }
 }
Пример #2
0
 private void OnTripleRetracted(Object sender, TripleEventArgs args)
 {
     if (!_persisting)
     {
         _actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple, true)));
     }
 }
Пример #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);
        }
Пример #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));
            }
        }
Пример #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);
        }
Пример #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);
        }
Пример #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));
            }
        }
Пример #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));
                }
            }
        }
Пример #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));
                }
            }
        }
Пример #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);
 }
Пример #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);
 }
Пример #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));
     }
 }
Пример #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));
     }
 }
Пример #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);
 }
Пример #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);
 }
Пример #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));
 }
Пример #17
0
 private void OnTripleRetracted(Object sender, TripleEventArgs args)
 {
     if (!this._persisting)
     {
         this._actions.Add(new TripleStorePersistenceAction(new TriplePersistenceAction(args.Triple, true)));
     }
 }
Пример #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)
 {
 }
Пример #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);
 }
Пример #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;
 }
Пример #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) { }
Пример #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);
 }
Пример #24
0
 private void HandleTripleAdded(Object sender, TripleEventArgs args)
 {
     this.RaiseTripleAdded(args.Triple);
 }