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