Fork me on GitHub
Show / Hide Table of Contents

Class PersistentCountByIntervalAwaitableConstraint

CountByIntervalAwaitableConstraint that is able to save own state.

Inheritance
System.Object
CountByIntervalAwaitableConstraint
PersistentCountByIntervalAwaitableConstraint
Implements
IAwaitableConstraint
Inherited Members
CountByIntervalAwaitableConstraint.TimeStamps
CountByIntervalAwaitableConstraint._TimeStamps
CountByIntervalAwaitableConstraint.WaitForReadiness(CancellationToken)
CountByIntervalAwaitableConstraint.Clone()
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 Source

PersistentCountByIntervalAwaitableConstraint(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 Source

OnEnded(DateTime)

Save state

Declaration
protected override void OnEnded(DateTime now)
Parameters
Type Name Description
System.DateTime now
Overrides
CountByIntervalAwaitableConstraint.OnEnded(DateTime)

Implements

IAwaitableConstraint

Extension Methods

AwaitableConstraintExtension.Compose(IAwaitableConstraint, IAwaitableConstraint)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX