Update RetryConfiguration.mustache (#7495)

* Update RetryConfiguration.mustache

Use Policy<> instead of RetryPolicy<> to allow for use of wrapped policies.

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Jeff Shantz 2020-09-29 10:42:58 -04:00 committed by GitHub
parent 6db283c03b
commit b8de51f2fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
using Polly.Retry; using Polly;
using RestSharp; using RestSharp;
namespace {{packageName}}.Client namespace {{packageName}}.Client
@ -11,11 +11,11 @@ namespace {{packageName}}.Client
/// <summary> /// <summary>
/// Retry policy /// Retry policy
/// </summary> /// </summary>
public static RetryPolicy<IRestResponse> RetryPolicy { get; set; } public static Policy<IRestResponse> RetryPolicy { get; set; }
/// <summary> /// <summary>
/// Async retry policy /// Async retry policy
/// </summary> /// </summary>
public static AsyncRetryPolicy<IRestResponse> AsyncRetryPolicy { get; set; } public static AsyncPolicy<IRestResponse> AsyncRetryPolicy { get; set; }
} }
} }

View File

@ -1,4 +1,4 @@
using Polly.Retry; using Polly;
using RestSharp; using RestSharp;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client
@ -11,11 +11,11 @@ namespace Org.OpenAPITools.Client
/// <summary> /// <summary>
/// Retry policy /// Retry policy
/// </summary> /// </summary>
public static RetryPolicy<IRestResponse> RetryPolicy { get; set; } public static Policy<IRestResponse> RetryPolicy { get; set; }
/// <summary> /// <summary>
/// Async retry policy /// Async retry policy
/// </summary> /// </summary>
public static AsyncRetryPolicy<IRestResponse> AsyncRetryPolicy { get; set; } public static AsyncPolicy<IRestResponse> AsyncRetryPolicy { get; set; }
} }
} }

View File

@ -1,4 +1,4 @@
using Polly.Retry; using Polly;
using RestSharp; using RestSharp;
namespace Org.OpenAPITools.Client namespace Org.OpenAPITools.Client
@ -11,11 +11,11 @@ namespace Org.OpenAPITools.Client
/// <summary> /// <summary>
/// Retry policy /// Retry policy
/// </summary> /// </summary>
public static RetryPolicy<IRestResponse> RetryPolicy { get; set; } public static Policy<IRestResponse> RetryPolicy { get; set; }
/// <summary> /// <summary>
/// Async retry policy /// Async retry policy
/// </summary> /// </summary>
public static AsyncRetryPolicy<IRestResponse> AsyncRetryPolicy { get; set; } public static AsyncPolicy<IRestResponse> AsyncRetryPolicy { get; set; }
} }
} }