C# Class Serenity.Throttler

Exibir arquivo Open project: volkanceylan/Serenity Class Usage Examples

Public Methods

Method Description
Check ( ) : bool

Checks if over throttle limit

Reset ( ) : void

Resets the throttle.

Throttler ( string key, System.TimeSpan duration, int limit ) : System

Creates a new throttler

Method Details

Check() public method

Checks if over throttle limit
public Check ( ) : bool
return bool

Reset() public method

Resets the throttle.
public Reset ( ) : void
return void

Throttler() public method

Creates a new throttler
public Throttler ( string key, System.TimeSpan duration, int limit ) : System
key string Cache key for throttler. Include the resource name, e.g. username, you are throttling
duration System.TimeSpan Check period
limit int How many times are allowed
return System