From 1ff16d0db788d0cfd9ae21317379df82fc8304ed Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Tue, 18 Aug 2020 14:38:37 +0900 Subject: [PATCH] [csharp-netcore] Adding ConfigureAwait(false) using async methods call (#7234) --- .../csharp-netcore/ApiClient.mustache | 2 +- .../resources/csharp-netcore/api.mustache | 6 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 4 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 60 +++++++++---------- .../Api/FakeClassnameTags123Api.cs | 4 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 36 +++++------ .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../src/Org.OpenAPITools/Api/UserApi.cs | 32 +++++----- .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 4 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 60 +++++++++---------- .../Api/FakeClassnameTags123Api.cs | 4 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 36 +++++------ .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../src/Org.OpenAPITools/Api/UserApi.cs | 32 +++++----- .../src/Org.OpenAPITools/Client/ApiClient.cs | 2 +- 18 files changed, 162 insertions(+), 162 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache index 0755845f52b..0a963cc5827 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache @@ -503,7 +503,7 @@ namespace {{packageName}}.Client InterceptRequest(req); - var response = await client.ExecuteAsync(req, cancellationToken); + var response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); InterceptResponse(req, response); diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache index de48699e690..978c0cc9610 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache @@ -395,8 +395,8 @@ namespace {{packageName}}.{{apiPackage}} /// Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}} {{#returnType}}public async System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken); - return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken);{{/returnType}} + {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); + return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}} } /// @@ -551,7 +551,7 @@ namespace {{packageName}}.{{apiPackage}} // make the HTTP request - var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index d934f08a9c3..94d8b854b0d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -264,7 +264,7 @@ namespace Org.OpenAPITools.Api /// Task of ModelClient public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -305,7 +305,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs index 150606b6f69..27789c4533a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -248,7 +248,7 @@ namespace Org.OpenAPITools.Api /// Task of InlineResponseDefault public async System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -282,7 +282,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index 0a354599ae9..b9e4db95ff9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -984,7 +984,7 @@ namespace Org.OpenAPITools.Api /// Task of HealthCheckResult public async System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1018,7 +1018,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1108,7 +1108,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task FakeHttpSignatureTestAsync(Pet pet, string query1 = default(string), string header1 = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await FakeHttpSignatureTestWithHttpInfoAsync(pet, query1, header1, cancellationToken); + await FakeHttpSignatureTestWithHttpInfoAsync(pet, query1, header1, cancellationToken).ConfigureAwait(false); } /// @@ -1159,7 +1159,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/http-signature-test", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/http-signature-test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1231,7 +1231,7 @@ namespace Org.OpenAPITools.Api /// Task of bool public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1268,7 +1268,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1340,7 +1340,7 @@ namespace Org.OpenAPITools.Api /// Task of OuterComposite public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1377,7 +1377,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1449,7 +1449,7 @@ namespace Org.OpenAPITools.Api /// Task of decimal public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1486,7 +1486,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1558,7 +1558,7 @@ namespace Org.OpenAPITools.Api /// Task of string public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1595,7 +1595,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1669,7 +1669,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken); + await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); } /// @@ -1708,7 +1708,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1790,7 +1790,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken); + await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); } /// @@ -1835,7 +1835,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1911,7 +1911,7 @@ namespace Org.OpenAPITools.Api /// Task of ModelClient public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1952,7 +1952,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2118,7 +2118,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken); + await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); } /// @@ -2223,7 +2223,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2345,7 +2345,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken); + await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); } /// @@ -2418,7 +2418,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2522,7 +2522,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken); + await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); } /// @@ -2581,7 +2581,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2655,7 +2655,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken); + await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); } /// @@ -2694,7 +2694,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2776,7 +2776,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken); + await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); } /// @@ -2821,7 +2821,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2926,7 +2926,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken); + await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); } /// @@ -2988,7 +2988,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-paramters", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-paramters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 15526a446d8..56ebdf5fd10 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -269,7 +269,7 @@ namespace Org.OpenAPITools.Api /// Task of ModelClient public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -315,7 +315,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake_classname_test", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake_classname_test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index ef688876f78..13207d998c8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -631,7 +631,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await AddPetWithHttpInfoAsync(pet, cancellationToken); + await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); } /// @@ -677,7 +677,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -759,7 +759,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken); + await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); } /// @@ -804,7 +804,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -886,7 +886,7 @@ namespace Org.OpenAPITools.Api /// Task of List<Pet> public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -933,7 +933,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByStatus", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByStatus", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1015,7 +1015,7 @@ namespace Org.OpenAPITools.Api /// Task of List<Pet> public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1062,7 +1062,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByTags", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByTags", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1139,7 +1139,7 @@ namespace Org.OpenAPITools.Api /// Task of Pet public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1181,7 +1181,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1262,7 +1262,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithHttpInfoAsync(pet, cancellationToken); + await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); } /// @@ -1308,7 +1308,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1398,7 +1398,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken); + await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); } /// @@ -1449,7 +1449,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1541,7 +1541,7 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1594,7 +1594,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1687,7 +1687,7 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1741,7 +1741,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs index 0d06d8ec977..6ab56c9e9bf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs @@ -386,7 +386,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken); + await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); } /// @@ -424,7 +424,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -496,7 +496,7 @@ namespace Org.OpenAPITools.Api /// Task of Dictionary<string, int> public async System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -535,7 +535,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/store/inventory", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/store/inventory", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -607,7 +607,7 @@ namespace Org.OpenAPITools.Api /// Task of Order public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -644,7 +644,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -721,7 +721,7 @@ namespace Org.OpenAPITools.Api /// Task of Order public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -763,7 +763,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs index 84d5e397f23..80436c9b433 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs @@ -559,7 +559,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUserWithHttpInfoAsync(user, cancellationToken); + await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); } /// @@ -598,7 +598,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -672,7 +672,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken); + await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); } /// @@ -711,7 +711,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -785,7 +785,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken); + await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); } /// @@ -824,7 +824,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -897,7 +897,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteUserWithHttpInfoAsync(username, cancellationToken); + await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); } /// @@ -935,7 +935,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1011,7 +1011,7 @@ namespace Org.OpenAPITools.Api /// Task of User public async System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1052,7 +1052,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1136,7 +1136,7 @@ namespace Org.OpenAPITools.Api /// Task of string public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1183,7 +1183,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1248,7 +1248,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await LogoutUserWithHttpInfoAsync(cancellationToken); + await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); } /// @@ -1280,7 +1280,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1362,7 +1362,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateUserWithHttpInfoAsync(username, user, cancellationToken); + await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); } /// @@ -1407,7 +1407,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs index 67a5f9bd6d6..48245247eeb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -506,7 +506,7 @@ namespace Org.OpenAPITools.Client InterceptRequest(req); - var response = await client.ExecuteAsync(req, cancellationToken); + var response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); InterceptResponse(req, response); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index d934f08a9c3..94d8b854b0d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -264,7 +264,7 @@ namespace Org.OpenAPITools.Api /// Task of ModelClient public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -305,7 +305,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/another-fake/dummy", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/DefaultApi.cs index 150606b6f69..27789c4533a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -248,7 +248,7 @@ namespace Org.OpenAPITools.Api /// Task of InlineResponseDefault public async System.Threading.Tasks.Task FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -282,7 +282,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs index 0a354599ae9..b9e4db95ff9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -984,7 +984,7 @@ namespace Org.OpenAPITools.Api /// Task of HealthCheckResult public async System.Threading.Tasks.Task FakeHealthGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1018,7 +1018,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/health", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1108,7 +1108,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task FakeHttpSignatureTestAsync(Pet pet, string query1 = default(string), string header1 = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await FakeHttpSignatureTestWithHttpInfoAsync(pet, query1, header1, cancellationToken); + await FakeHttpSignatureTestWithHttpInfoAsync(pet, query1, header1, cancellationToken).ConfigureAwait(false); } /// @@ -1159,7 +1159,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/http-signature-test", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/http-signature-test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1231,7 +1231,7 @@ namespace Org.OpenAPITools.Api /// Task of bool public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync(bool? body = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1268,7 +1268,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1340,7 +1340,7 @@ namespace Org.OpenAPITools.Api /// Task of OuterComposite public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1377,7 +1377,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/composite", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1449,7 +1449,7 @@ namespace Org.OpenAPITools.Api /// Task of decimal public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync(decimal? body = default(decimal?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1486,7 +1486,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/number", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1558,7 +1558,7 @@ namespace Org.OpenAPITools.Api /// Task of string public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1595,7 +1595,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/outer/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1669,7 +1669,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken); + await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); } /// @@ -1708,7 +1708,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-file-schema", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1790,7 +1790,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken); + await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); } /// @@ -1835,7 +1835,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/body-with-query-params", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1911,7 +1911,7 @@ namespace Org.OpenAPITools.Api /// Task of ModelClient public async System.Threading.Tasks.Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1952,7 +1952,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2118,7 +2118,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken); + await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken).ConfigureAwait(false); } /// @@ -2223,7 +2223,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2345,7 +2345,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken); + await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); } /// @@ -2418,7 +2418,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2522,7 +2522,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken); + await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); } /// @@ -2581,7 +2581,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/fake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2655,7 +2655,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken); + await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); } /// @@ -2694,7 +2694,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/inline-additionalProperties", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2776,7 +2776,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken); + await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); } /// @@ -2821,7 +2821,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/fake/jsonFormData", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2926,7 +2926,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken); + await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); } /// @@ -2988,7 +2988,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-paramters", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/fake/test-query-paramters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 15526a446d8..56ebdf5fd10 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -269,7 +269,7 @@ namespace Org.OpenAPITools.Api /// Task of ModelClient public async System.Threading.Tasks.Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -315,7 +315,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake_classname_test", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/fake_classname_test", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs index ef688876f78..13207d998c8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs @@ -631,7 +631,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await AddPetWithHttpInfoAsync(pet, cancellationToken); + await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); } /// @@ -677,7 +677,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -759,7 +759,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken); + await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); } /// @@ -804,7 +804,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -886,7 +886,7 @@ namespace Org.OpenAPITools.Api /// Task of List<Pet> public async System.Threading.Tasks.Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -933,7 +933,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByStatus", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByStatus", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1015,7 +1015,7 @@ namespace Org.OpenAPITools.Api /// Task of List<Pet> public async System.Threading.Tasks.Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1062,7 +1062,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByTags", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/pet/findByTags", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1139,7 +1139,7 @@ namespace Org.OpenAPITools.Api /// Task of Pet public async System.Threading.Tasks.Task GetPetByIdAsync(long petId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1181,7 +1181,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1262,7 +1262,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithHttpInfoAsync(pet, cancellationToken); + await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); } /// @@ -1308,7 +1308,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/pet", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1398,7 +1398,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken); + await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); } /// @@ -1449,7 +1449,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1541,7 +1541,7 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1594,7 +1594,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/pet/{petId}/uploadImage", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1687,7 +1687,7 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1741,7 +1741,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/fake/{petId}/uploadImageWithRequiredFile", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs index 0d06d8ec977..6ab56c9e9bf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -386,7 +386,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken); + await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); } /// @@ -424,7 +424,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -496,7 +496,7 @@ namespace Org.OpenAPITools.Api /// Task of Dictionary<string, int> public async System.Threading.Tasks.Task> GetInventoryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -535,7 +535,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/store/inventory", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/store/inventory", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -607,7 +607,7 @@ namespace Org.OpenAPITools.Api /// Task of Order public async System.Threading.Tasks.Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -644,7 +644,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/store/order/{order_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -721,7 +721,7 @@ namespace Org.OpenAPITools.Api /// Task of Order public async System.Threading.Tasks.Task PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -763,7 +763,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/store/order", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs index 84d5e397f23..80436c9b433 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/UserApi.cs @@ -559,7 +559,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUserWithHttpInfoAsync(user, cancellationToken); + await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); } /// @@ -598,7 +598,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -672,7 +672,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken); + await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); } /// @@ -711,7 +711,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithArray", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -785,7 +785,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken); + await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); } /// @@ -824,7 +824,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PostAsync("/user/createWithList", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -897,7 +897,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteUserWithHttpInfoAsync(username, cancellationToken); + await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); } /// @@ -935,7 +935,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1011,7 +1011,7 @@ namespace Org.OpenAPITools.Api /// Task of User public async System.Threading.Tasks.Task GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1052,7 +1052,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1136,7 +1136,7 @@ namespace Org.OpenAPITools.Api /// Task of string public async System.Threading.Tasks.Task LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1183,7 +1183,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1248,7 +1248,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task LogoutUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await LogoutUserWithHttpInfoAsync(cancellationToken); + await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); } /// @@ -1280,7 +1280,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.GetAsync("/user/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -1362,7 +1362,7 @@ namespace Org.OpenAPITools.Api /// Task of void public async System.Threading.Tasks.Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateUserWithHttpInfoAsync(username, user, cancellationToken); + await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); } /// @@ -1407,7 +1407,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken); + var localVarResponse = await this.AsynchronousClient.PutAsync("/user/{username}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs index 54ee6c97051..790e57e4c7a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs @@ -507,7 +507,7 @@ namespace Org.OpenAPITools.Client InterceptRequest(req); - var response = await client.ExecuteAsync(req, cancellationToken); + var response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); InterceptResponse(req, response);