Skip to content

Commit b8de51f

Browse files
jeffshantzwing328
andauthored
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>
1 parent 6db283c commit b8de51f

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

modules/openapi-generator/src/main/resources/csharp-netcore/RetryConfiguration.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Polly.Retry;
1+
using Polly;
22
using RestSharp;
33

44
namespace {{packageName}}.Client
@@ -11,11 +11,11 @@ namespace {{packageName}}.Client
1111
/// <summary>
1212
/// Retry policy
1313
/// </summary>
14-
public static RetryPolicy<IRestResponse> RetryPolicy { get; set; }
14+
public static Policy<IRestResponse> RetryPolicy { get; set; }
1515

1616
/// <summary>
1717
/// Async retry policy
1818
/// </summary>
19-
public static AsyncRetryPolicy<IRestResponse> AsyncRetryPolicy { get; set; }
19+
public static AsyncPolicy<IRestResponse> AsyncRetryPolicy { get; set; }
2020
}
21-
}
21+
}

samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RetryConfiguration.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Polly.Retry;
1+
using Polly;
22
using RestSharp;
33

44
namespace Org.OpenAPITools.Client
@@ -11,11 +11,11 @@ public class RetryConfiguration
1111
/// <summary>
1212
/// Retry policy
1313
/// </summary>
14-
public static RetryPolicy<IRestResponse> RetryPolicy { get; set; }
14+
public static Policy<IRestResponse> RetryPolicy { get; set; }
1515

1616
/// <summary>
1717
/// Async retry policy
1818
/// </summary>
19-
public static AsyncRetryPolicy<IRestResponse> AsyncRetryPolicy { get; set; }
19+
public static AsyncPolicy<IRestResponse> AsyncRetryPolicy { get; set; }
2020
}
21-
}
21+
}

samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RetryConfiguration.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Polly.Retry;
1+
using Polly;
22
using RestSharp;
33

44
namespace Org.OpenAPITools.Client
@@ -11,11 +11,11 @@ public class RetryConfiguration
1111
/// <summary>
1212
/// Retry policy
1313
/// </summary>
14-
public static RetryPolicy<IRestResponse> RetryPolicy { get; set; }
14+
public static Policy<IRestResponse> RetryPolicy { get; set; }
1515

1616
/// <summary>
1717
/// Async retry policy
1818
/// </summary>
19-
public static AsyncRetryPolicy<IRestResponse> AsyncRetryPolicy { get; set; }
19+
public static AsyncPolicy<IRestResponse> AsyncRetryPolicy { get; set; }
2020
}
21-
}
21+
}

0 commit comments

Comments
 (0)