public PastOrFutureAttribute(PastOrFuture pastOrFuture)
 {
     this.PastOrFuture = pastOrFuture;
 }
        public DateTime GetDateTime(PastOrFuture? pastOrFuture, Func<long?, long> longIntegerGetter, long? min = null, long? max = null)
        {
            AccumulatorValueProvider.Logger.Debug("Entering GetDateTime");
            DateTime result = DateTime.Now.AddDays(this.Count++);

            AccumulatorValueProvider.Logger.Debug($"Exiting GetDateTime. result: {result}");
            return result;
        }
        public virtual DateTime GetDateTime(PastOrFuture? pastOrFuture, Func<long?, long> longIntegerGetter, long? min, long? max)
        {
            StandardRandomizer.Logger.Debug($"Entering GetDateTime. pastOrFuture: {pastOrFuture}");

            pastOrFuture = pastOrFuture ?? PastOrFuture.Past;

            DateTime dateTime = this.dateProvider();
            DateTime result;

            long maxLong, randomLong;
            switch (pastOrFuture.Value)
            {
                case PastOrFuture.Future:
                    maxLong = (max ?? this.dateTimeMaxValue) - dateTime.Ticks;
                    randomLong = longIntegerGetter(maxLong);
                    result = dateTime.AddTicks(randomLong);
                    break;

                case PastOrFuture.Past:
                    maxLong = dateTime.Ticks - (min ?? this.dateTimeMinValue);
                    randomLong = longIntegerGetter(maxLong);
                    result = dateTime.AddTicks(-randomLong);
                    break;

                default:
                    throw new ArgumentException(Messages.UnknownPastOrFutureEnumValue, nameof(pastOrFuture));
            }

            StandardRandomizer.Logger.Debug($"Exiting GetDateTime. result: {result}");
            return result;
        }