ThrottleException

ThrottleException Class

Thrown when a method is called too often

Syntax

public class ThrottleException : Exception

Remarks

The ThrottleException class has information about the throttle rate and how fast the throttle was hit. This exception is thrown before any action is taken by the method.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Members

See Also: Inherited members from Exception.

Public Fields

readonly
Elapsed TimeSpan . The timespan during which ThrottleException.MaxEvents method calls have happened.
readonly
Interval TimeSpan . The timespan during which at most ThrottleException.MaxEvents can happen without hitting the throttle.
readonly
MaxEvents int . The maximum number of method calls allowed per ThrottleException.Interval

Member Details

Elapsed Field

The timespan during which ThrottleException.MaxEvents method calls have happened.

Syntax

public readonly TimeSpan Elapsed

Remarks

Elapsed is a measure of how fast the throttle was hit. All ThrottleException.MaxEvents have happened within the last Elapsed time span.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Interval Field

The timespan during which at most ThrottleException.MaxEvents can happen without hitting the throttle.

Syntax

public readonly TimeSpan Interval

Remarks

Sansar.Script.ThrottleException is thrown if there have already been ThrottleException.MaxEvents successful calls to this method during the last Interval timespan.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

MaxEvents Field

The maximum number of method calls allowed per ThrottleException.Interval

Syntax

public readonly int MaxEvents

Remarks

Method calls past MaxEvents during ThrottleException.Interval will throw an exception and not be counted as events.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.