Search Results for

    Show / Hide Table of Contents

    Class Throttler

    Makes sure a method is always called 'MillisecondsToDelay' after the previous call.

    Inheritance
    object
    Throttler
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.Fetcher
    Assembly: Mapsui.dll
    Syntax
    public class Throttler

    Methods

    | Edit this page View Source

    ExecuteAsync(Action, int)

    Schedules the specified action to be executed after a minimum delay, ensuring that at least delayBetweenCalls milliseconds have elapsed since the previous execution. If multiple calls are made in quick succession, only the most recent is executed.

    Declaration
    public Task ExecuteAsync(Action action, int delayBetweenCalls)
    Parameters
    Type Name Description
    Action action

    The action to execute.

    int delayBetweenCalls

    The minimum number of milliseconds between two executions.

    Returns
    Type Description
    Task
    | Edit this page View Source

    ExecuteAsync(Func<Task>, int)

    Schedules the specified asynchronous function to be executed after a minimum delay, ensuring that at least delayBetweenCalls milliseconds have elapsed since the previous execution. If multiple calls are made in quick succession, only the most recent is executed.

    Declaration
    public Task ExecuteAsync(Func<Task> func, int delayBetweenCalls)
    Parameters
    Type Name Description
    Func<Task> func

    The asynchronous function to execute.

    int delayBetweenCalls

    The minimum number of milliseconds between two executions.

    Returns
    Type Description
    Task

    Extension Methods

    DisposableExtension.DisposeIfDisposable(object?)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX