private void RecordDeletion(IDeletionProcessedArgs args) { this.safeRepository.CreateEntityDeletion(new EntityDeletion( this.operationExecutive.CurrentOperation, this.context.EntityType.Id, args.EntityId, (int)args.Outcome)); }
/// <summary> /// Called when the deletion of a destination system entity (identified for /// deletion) has been processed. /// </summary> /// <param name="args">The event data.</param> public override void OnDeletionProcessed(IDeletionProcessedArgs args) { if (this.ShouldRecordDeletion(args)) { this.RecordDeletion(args); this.RecordDeletionDestinationSystemEntity(); this.RecordMessages(args); } }
/// <summary> /// Called when the deletion of a destination system entity (identified for /// deletion) has been processed. /// </summary> /// <param name="args">The event data.</param> public override void OnDeletionProcessed(IDeletionProcessedArgs args) { this.entitiesDeleted++; if ((DateTime.Now - this.lastRefreshDateTime).TotalMilliseconds >= RefreshInterval || this.entitiesDeleted == this.entityCount) { this.PrintEntityDeletionProgress(); this.lastRefreshDateTime = DateTime.Now; } }
private bool ShouldRecordDeletion(IDeletionProcessedArgs args) { bool shouldRecordDeletion = true; if (this .loggingConfigurationProvider .GarbageCollectionConfiguration .ExcludedOutcomes .Contains(args.Outcome)) { if (!this .loggingConfigurationProvider .GarbageCollectionConfiguration .AlwaysLogMessages || args.LogMessages.Count() == 0) { shouldRecordDeletion = false; } } return(shouldRecordDeletion); }
/// <summary> /// Called when the deletion of a destination system entity (identified for /// deletion) has been processed. /// </summary> /// <param name="args">The event data.</param> public virtual void OnDeletionProcessed(IDeletionProcessedArgs args) { }
/// <summary> /// Called when the deletion of a destination system entity (identified for /// deletion) has been processed. /// </summary> /// <param name="args">The event data.</param> void IEventReceiver <IDeletionProcessedArgs> .Occurred(IDeletionProcessedArgs args) { this.OnDeletionProcessed(args); }
/// <summary> /// To be called when the deletion of a destination system entity (identified for /// deletion) has been processed. /// </summary> /// <param name="args">The event data.</param> public void DeletionProcessed(IDeletionProcessedArgs args) { this.Dispatch(args); }