コード例 #1
0
 public static RateLimitingOptions Allow(this RateLimitingOptions options, string name, Selector <bool> predicate)
 {
     return(options.Allow(name, predicate.ToAsync()));
 }
コード例 #2
0
 public static RateLimitingOptions Allow(this RateLimitingOptions options, string name, IPAddress address)
 {
     return(options.Allow(name, ctx => ctx.Connection.RemoteIpAddress.Equals(address)));
 }
コード例 #3
0
 public static RateLimitingOptions Allow(this RateLimitingOptions options, string name, IPNetwork network)
 {
     return(options.Allow(name, ctx => network.Contains(ctx.Connection.RemoteIpAddress)));
 }