Roc Gao 2018-09-12 14:44:22 +08:00 committed by Tom Pallister
parent f934620538
commit 0b9ff92549

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace Ocelot.RateLimit
{
@ -10,10 +11,11 @@ namespace Ocelot.RateLimit
/// </summary>
public struct RateLimitCounter
{
public RateLimitCounter(DateTime timestamp, long totalRequest)
[JsonConstructor]
public RateLimitCounter(DateTime timestamp, long totalRequests)
{
Timestamp = timestamp;
TotalRequests = totalRequest;
TotalRequests = totalRequests;
}
public DateTime Timestamp { get; private set; }