docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MaximumNumberOfAttemptsRetryPolicy

    A retry policy that limits the number of attempts to a specified maximum.

    Inheritance
    object
    MaximumNumberOfAttemptsRetryPolicy
    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 MaximumNumberOfAttemptsRetryPolicy : IRetryPolicy

    Constructors

    MaximumNumberOfAttemptsRetryPolicy(int)

    Initializes a maximum number of attempts retry policy with the specified maximum number of attempts.

    Declaration
    public MaximumNumberOfAttemptsRetryPolicy(int maximumNumberOfAttempts)
    Parameters
    Type Name Description
    int maximumNumberOfAttempts

    The maximum number of attempts allowed before giving up.

    Methods

    ShouldRetry(IRetryPolicyInformation)

    Determines whether the retry policy should allow another attempt based on the number of attempts made.

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

    The information about the retry attempt, including the number of attempts made.

    Returns
    Type Description
    Task<bool>

    True if another attempt should be made; otherwise, false.

    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)