Table of Contents

Class RateGateExtensions

Namespace
Sportradar.LiveData.Sdk.Services.RateLimiter
Assembly
Sportradar.LiveData.Sdk.dll
public static class RateGateExtensions
Inheritance
RateGateExtensions
Inherited Members

Methods

LimitRate<T>(IEnumerable<T>, string, int, TimeSpan)

Limits the rate at which the sequence is enumerated.

public static IEnumerable<T> LimitRate<T>(this IEnumerable<T> source, string name, int count, TimeSpan timeUnit)

Parameters

source IEnumerable<T>

The IEnumerable<T> whose enumeration is to be rate limited.

name string

Rate limiter instance name

count int

The number of items in the sequence that are allowed to be processed per time unit.

timeUnit TimeSpan

Length of the time unit.

Returns

IEnumerable<T>

An IEnumerable<T> containing the elements of the source sequence.

Type Parameters

T

The type of the elements of source.