public RunGarbageCollection( ITimestampCreator timestampCreator, Fifthweek.GarbageCollection.IDeleteTestUserAccountsDbStatement deleteTestUserAccounts, Fifthweek.GarbageCollection.IGetFilesEligibleForGarbageCollectionDbStatement getFilesEligibleForGarbageCollection, Fifthweek.GarbageCollection.IDeleteBlobsForFile deleteBlobsForFile, Fifthweek.GarbageCollection.IDeleteFileDbStatement deleteFileDbStatement, Fifthweek.GarbageCollection.IDeleteOrphanedBlobContainers deleteOrphanedBlobContainers) { if (timestampCreator == null) { throw new ArgumentNullException("timestampCreator"); } if (deleteTestUserAccounts == null) { throw new ArgumentNullException("deleteTestUserAccounts"); } if (getFilesEligibleForGarbageCollection == null) { throw new ArgumentNullException("getFilesEligibleForGarbageCollection"); } if (deleteBlobsForFile == null) { throw new ArgumentNullException("deleteBlobsForFile"); } if (deleteFileDbStatement == null) { throw new ArgumentNullException("deleteFileDbStatement"); } if (deleteOrphanedBlobContainers == null) { throw new ArgumentNullException("deleteOrphanedBlobContainers"); } this.timestampCreator = timestampCreator; this.deleteTestUserAccounts = deleteTestUserAccounts; this.getFilesEligibleForGarbageCollection = getFilesEligibleForGarbageCollection; this.deleteBlobsForFile = deleteBlobsForFile; this.deleteFileDbStatement = deleteFileDbStatement; this.deleteOrphanedBlobContainers = deleteOrphanedBlobContainers; }
public TestPaymentsAvailabilityStatement( Fifthweek.Shared.IExceptionHandler exceptionHandler, Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.ITransientErrorDetectionStrategy transientErrorDetectionStrategy, Fifthweek.Azure.ICloudStorageAccount cloudStorageAccount, ITimestampCreator timestampCreator, Fifthweek.Payments.Shared.IRequestProcessPaymentsService requestProcessPayments, Fifthweek.Api.Availability.ILastPaymentsRestartTimeContainer lastPaymentsRestartTimeContainer) { if (exceptionHandler == null) { throw new ArgumentNullException("exceptionHandler"); } if (transientErrorDetectionStrategy == null) { throw new ArgumentNullException("transientErrorDetectionStrategy"); } if (cloudStorageAccount == null) { throw new ArgumentNullException("cloudStorageAccount"); } if (timestampCreator == null) { throw new ArgumentNullException("timestampCreator"); } if (requestProcessPayments == null) { throw new ArgumentNullException("requestProcessPayments"); } if (lastPaymentsRestartTimeContainer == null) { throw new ArgumentNullException("lastPaymentsRestartTimeContainer"); } this.exceptionHandler = exceptionHandler; this.transientErrorDetectionStrategy = transientErrorDetectionStrategy; this.cloudStorageAccount = cloudStorageAccount; this.timestampCreator = timestampCreator; this.requestProcessPayments = requestProcessPayments; this.lastPaymentsRestartTimeContainer = lastPaymentsRestartTimeContainer; }
public static DateTime ReleasableRevenueDate(this ITimestampCreator timestampCreator) { var now = timestampCreator.Now(); return(now.AddDays(-BlogsConstants.ReleaseableRevenueDays)); }