Exemplo n.º 1
0
        protected virtual DateTime CreateExpireTime(RateLimitOptions options)
        {
            switch (options.Type)
            {
            case ERateLimitType.NaturalDay:
                return(DateTime.Today.AddDays(1));

            case ERateLimitType.TimeSpan:
                return(DateTime.Now.Add(options.Period));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }