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.
Implements
Inherited Members
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 |