Class MaximumNumberOfAttemptsRetryPolicy
A retry policy that limits the number of attempts to a specified maximum.
Implements
Inherited Members
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. |