Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting AutomaticRetryAttribute.DelayInSecondsByAttemptFunc #2459

Open
mikeholczer opened this issue Oct 23, 2024 · 0 comments
Open

Setting AutomaticRetryAttribute.DelayInSecondsByAttemptFunc #2459

mikeholczer opened this issue Oct 23, 2024 · 0 comments

Comments

@mikeholczer
Copy link

Is there anyway to set AutomaticRetryAttribute.DelayInSecondsByAttemptFunc without using reflection?

/// <summary>
/// Gets or sets a function using to get a delay by an attempt number.
/// </summary>
/// <exception cref="ArgumentNullException">The value in a set operation is null.</exception>
[JsonIgnore]
public Func<long, int> DelayInSecondsByAttemptFunc
{
get { lock (_lockObject) { return _delayInSecondsByAttemptFunc;} }
set
{
if (value == null) throw new ArgumentNullException(nameof(value));
lock (_lockObject) { _delayInSecondsByAttemptFunc = value; }
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant