From b8de51f2fd642a67616d06e92864dc40cd5025a8 Mon Sep 17 00:00:00 2001 From: Jeff Shantz Date: Tue, 29 Sep 2020 10:42:58 -0400 Subject: [PATCH] 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 --- .../resources/csharp-netcore/RetryConfiguration.mustache | 8 ++++---- .../src/Org.OpenAPITools/Client/RetryConfiguration.cs | 8 ++++---- .../src/Org.OpenAPITools/Client/RetryConfiguration.cs | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/RetryConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/RetryConfiguration.mustache index 8926f922c4b..a43781ed19f 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/RetryConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/RetryConfiguration.mustache @@ -1,4 +1,4 @@ -using Polly.Retry; +using Polly; using RestSharp; namespace {{packageName}}.Client @@ -11,11 +11,11 @@ namespace {{packageName}}.Client /// /// Retry policy /// - public static RetryPolicy RetryPolicy { get; set; } + public static Policy RetryPolicy { get; set; } /// /// Async retry policy /// - public static AsyncRetryPolicy AsyncRetryPolicy { get; set; } + public static AsyncPolicy AsyncRetryPolicy { get; set; } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RetryConfiguration.cs index 0a8f3f9d07b..c93633a36d9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,4 +1,4 @@ -using Polly.Retry; +using Polly; using RestSharp; namespace Org.OpenAPITools.Client @@ -11,11 +11,11 @@ namespace Org.OpenAPITools.Client /// /// Retry policy /// - public static RetryPolicy RetryPolicy { get; set; } + public static Policy RetryPolicy { get; set; } /// /// Async retry policy /// - public static AsyncRetryPolicy AsyncRetryPolicy { get; set; } + public static AsyncPolicy AsyncRetryPolicy { get; set; } } -} \ No newline at end of file +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RetryConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RetryConfiguration.cs index 0a8f3f9d07b..c93633a36d9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RetryConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RetryConfiguration.cs @@ -1,4 +1,4 @@ -using Polly.Retry; +using Polly; using RestSharp; namespace Org.OpenAPITools.Client @@ -11,11 +11,11 @@ namespace Org.OpenAPITools.Client /// /// Retry policy /// - public static RetryPolicy RetryPolicy { get; set; } + public static Policy RetryPolicy { get; set; } /// /// Async retry policy /// - public static AsyncRetryPolicy AsyncRetryPolicy { get; set; } + public static AsyncPolicy AsyncRetryPolicy { get; set; } } -} \ No newline at end of file +}