internal async Task OnDeleted(ReplicateDataMessage message, IEntity entity)
 {
     if (Deleted != null)
     {
         await Deleted.Raise(new ReplicationDeleteMessageProcessedEventArgs(message, entity));
     }
 }
Exemple #2
0
        protected internal virtual async Task OnDeleted(EventArgs e)
        {
            InvalidateCachedReferences();
            await Deleted.Raise();

            await GlobalEntityEvents.OnInstanceDeleted(new GlobalDeleteEventArgs(this));

            InvalidateCachedReferences();
        }
Exemple #3
0
        public void Delete(Topic topic)
        {
            var eventArgs = new TopicEventArgs()
            {
                Topic = topic
            };

            if (Deleting.RaiseAndContinue(this, eventArgs))
            {
                _databaseContext.Database.Delete(topic);
                Deleted.Raise(this, eventArgs);
            }
            else
            {
                CancelledByEvent.Raise(this, eventArgs);
            }
        }
Exemple #4
0
        public void Delete(Models.Forum forum)
        {
            var eventArgs = new ForumEventArgs()
            {
                Forum = forum
            };

            if (Deleting.RaiseAndContinue(this, eventArgs))
            {
                _databaseContext.Database.Delete(forum);
                Deleted.Raise(this, eventArgs);
            }
            else
            {
                CancelledByEvent.Raise(this, eventArgs);
            }
        }
        public void Delete(Comment comment)
        {
            var eventArgs = new CommentEventArgs()
            {
                Comment = comment
            };

            if (Deleting.RaiseAndContinue(this, eventArgs))
            {
                UpdateTopicPostsCount(comment, false);
                _databaseContext.Database.Delete(comment);
                Deleted.Raise(this, eventArgs);
            }
            else
            {
                CancelledByEvent.Raise(this, eventArgs);
            }
        }
Exemple #6
0
 /// <summary>
 /// Raises the Deleted event</summary>
 /// <param name="e">Event args</param>
 protected virtual void OnDeleted(EventArgs e)
 {
     Deleted.Raise(this, e);
 }
 private void FileSystemWatcherOnDeleted(object sender, FileSystemEventArgs e)
 {
     Deleted.Raise(sender, e);
 }
Exemple #8
0
 /// <summary>
 /// Raises the Deleted event.
 /// </summary>
 /// <param name="e"></param>
 protected virtual void RaiseDeleted(NodeDeletedEventArgs e)
 {
     Deleted.Raise(this, e);
 }