示例#1
0
 private void RecordDeletion(IDeletionProcessedArgs args)
 {
     this.safeRepository.CreateEntityDeletion(new EntityDeletion(
                                                  this.operationExecutive.CurrentOperation,
                                                  this.context.EntityType.Id,
                                                  args.EntityId,
                                                  (int)args.Outcome));
 }
示例#2
0
 /// <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);
     }
 }
示例#3
0
 /// <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;
     }
 }
示例#4
0
        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);
        }
示例#5
0
 /// <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)
 {
 }
示例#6
0
 /// <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);
 }
示例#7
0
 /// <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);
 }