docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TimeLimitRetryPolicy

    A retry policy that retries operations until a specified time limit is reached. This policy will continue retrying failed operations as long as the total elapsed time is less than the configured time limit.

    Inheritance
    object
    TimeLimitRetryPolicy
    Implements
    IRetryPolicy
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Purchasing
    Assembly: Unity.Purchasing.dll
    Syntax
    public class TimeLimitRetryPolicy : IRetryPolicy

    Constructors

    TimeLimitRetryPolicy(float)

    Initializes a new instance of the TimeLimitRetryPolicy class with the specified time limit.

    Declaration
    public TimeLimitRetryPolicy(float timeLimit)
    Parameters
    Type Name Description
    float timeLimit

    The maximum time in seconds to continue retrying operations before giving up.

    Methods

    ShouldRetry(IRetryPolicyInformation)

    Determines whether a failed operation should be retried based on the elapsed time.

    Declaration
    public virtual Task<bool> ShouldRetry(IRetryPolicyInformation info)
    Parameters
    Type Name Description
    IRetryPolicyInformation info

    Information about the current retry attempt, including elapsed time and attempt count.

    Returns
    Type Description
    Task<bool>

    A task that resolves to true if the operation should be retried (elapsed time is less than the time limit), or false if the time limit has been exceeded and no further retries should be attempted.

    Implements

    IRetryPolicy
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)