Class PersistentCountByIntervalAwaitableConstraint
CountByIntervalAwaitableConstraint that is able to save own state.
Inheritance
System.Object
PersistentCountByIntervalAwaitableConstraint
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: RateLimiter
Assembly: RateLimiter.dll
Syntax
public sealed class PersistentCountByIntervalAwaitableConstraint : CountByIntervalAwaitableConstraint, IAwaitableConstraint
Constructors
| Improve this Doc View SourcePersistentCountByIntervalAwaitableConstraint(Int32, TimeSpan, Action<DateTime>, IEnumerable<DateTime>)
Create an instance of PersistentCountByIntervalAwaitableConstraint.
Declaration
public PersistentCountByIntervalAwaitableConstraint(int count, TimeSpan timeSpan, Action<DateTime> saveStateAction, IEnumerable<DateTime> initialTimeStamps)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count | Maximum actions allowed per time interval. |
System.TimeSpan | timeSpan | Time interval limits are applied for. |
System.Action<System.DateTime> | saveStateAction | Action is used to save state. |
System.Collections.Generic.IEnumerable<System.DateTime> | initialTimeStamps | Initial timestamps. |
Methods
| Improve this Doc View SourceOnEnded(DateTime)
Save state
Declaration
protected override void OnEnded(DateTime now)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | now |