internal async Task OnDeleted(ReplicateDataMessage message, IEntity entity) { if (Deleted != null) { await Deleted.Raise(new ReplicationDeleteMessageProcessedEventArgs(message, entity)); } }
protected internal virtual async Task OnDeleted(EventArgs e) { InvalidateCachedReferences(); await Deleted.Raise(); await GlobalEntityEvents.OnInstanceDeleted(new GlobalDeleteEventArgs(this)); InvalidateCachedReferences(); }
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); } }
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); } }
/// <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); }
/// <summary> /// Raises the Deleted event. /// </summary> /// <param name="e"></param> protected virtual void RaiseDeleted(NodeDeletedEventArgs e) { Deleted.Raise(this, e); }