From 6fb9e6537bb1dd404ad9fd3c1ff3276df7f3c232 Mon Sep 17 00:00:00 2001 From: zijianhuang Date: Sat, 22 Jun 2024 18:17:23 +1000 Subject: [PATCH] no more .result --- .../WebApiClientTextJsonAuto.cs | 372 +++++++++--------- .../ClientApiTsFunctionGenAbstract.cs | 5 +- WebApiClientGenCore/ClientApiFunctionGen.cs | 2 +- 3 files changed, 189 insertions(+), 190 deletions(-) diff --git a/DemoCoreWeb.ClientApiTextJson/WebApiClientTextJsonAuto.cs b/DemoCoreWeb.ClientApiTextJson/WebApiClientTextJsonAuto.cs index cb291a08..bcc7127e 100644 --- a/DemoCoreWeb.ClientApiTextJson/WebApiClientTextJsonAuto.cs +++ b/DemoCoreWeb.ClientApiTextJson/WebApiClientTextJsonAuto.cs @@ -145,7 +145,7 @@ public System.DateOnly GetDateOnlyMin(Action h var requestUri = "api/Entities/"+id; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Delete, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -1608,7 +1608,7 @@ public DemoWebApi.DemoData.Client.Company GetCompany(long id, Action GetMims(DemoWebApi.DemoData var content = System.Net.Http.Json.JsonContent.Create(p, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -1706,7 +1706,7 @@ public DemoWebApi.DemoData.Client.MyGeneric GetMyGeneri var content = System.Net.Http.Json.JsonContent.Create(s, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -1756,7 +1756,7 @@ public DemoWebApi.DemoData.Client.MyGeneric GetMyGeneri var content = System.Net.Http.Json.JsonContent.Create(s, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -1804,7 +1804,7 @@ public DemoWebApi.DemoData.Client.Company GetNullCompany(Action h var requestUri = "api/Heroes/"+id; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Delete, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -2200,7 +2200,7 @@ public DemoWebApi.Controllers.Client.Hero[] GetAsyncHeroes(Action h var requestUri = "api/Numbers/byte?d="+d; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -2651,7 +2651,7 @@ public byte GetByteWithRange(byte d, Action hand var content = System.Net.Http.Json.JsonContent.Create(d, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -2743,7 +2743,7 @@ public sbyte Post(sbyte d, Action ha var content = System.Net.Http.Json.JsonContent.Create(d, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -2789,7 +2789,7 @@ public short Post(short d, Action ha var content = System.Net.Http.Json.JsonContent.Create(d, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -2835,7 +2835,7 @@ public ushort Post(ushort d, Action var content = System.Net.Http.Json.JsonContent.Create(d, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -2881,7 +2881,7 @@ public int Post(int d, Action handle var content = System.Net.Http.Json.JsonContent.Create(d, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -2927,7 +2927,7 @@ public long Post(long d, Action hand var content = System.Net.Http.Json.JsonContent.Create(d, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -2973,7 +2973,7 @@ public ulong Post(ulong d, Action ha var content = System.Net.Http.Json.JsonContent.Create(d, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -3019,7 +3019,7 @@ public System.Numerics.BigInteger PostBigInteger(System.Numerics.BigInteger bigI var content = System.Net.Http.Json.JsonContent.Create(bigInteger, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -3067,7 +3067,7 @@ public string PostBigIntegralAsStringForJs(string bigIntegral, Action take, int skip, string order, var requestUri = "api/StringData/AthletheSearch?"+(take.HasValue?"take="+take.Value.ToString():String.Empty)+"&skip="+skip+"&order="+(order == null ? "" : Uri.EscapeDataString(order))+"&sort="+(sort == null ? "" : Uri.EscapeDataString(sort))+"&search="+(search == null ? "" : Uri.EscapeDataString(search)); using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -3616,7 +3616,7 @@ public string GetABCDE(Action handle var requestUri = "api/StringData/String"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -3664,7 +3664,7 @@ public string GetEmptyString(Action var requestUri = "api/StringData/EmptyString"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -3714,7 +3714,7 @@ public string GetNullString(Action h var requestUri = "api/StringData/NullString"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -3773,7 +3773,7 @@ public System.Net.Http.HttpResponseMessage GetActionResult(Action handleHea var requestUri = "api/SuperDemo/bool"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -3975,7 +3975,7 @@ public byte Getbyte(Action handleHea var requestUri = "api/SuperDemo/byte"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4018,7 +4018,7 @@ public byte[] GetByteArray(Action ha var requestUri = "api/SuperDemo/ByteArray"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4061,7 +4061,7 @@ public char GetChar(Action handleHea var requestUri = "api/SuperDemo/char"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4104,7 +4104,7 @@ public char GetChar(Action handleHea var requestUri = "api/SuperDemo/Collection"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4147,7 +4147,7 @@ public DemoWebApi.DemoData.Client.Days GetDay(DemoWebApi.DemoData.Client.Days d, var requestUri = "api/SuperDemo/enumGet?d="+d; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4189,7 +4189,7 @@ public decimal GetDecimal(Action han var requestUri = "api/SuperDemo/decimal"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4234,7 +4234,7 @@ public decimal[] GetDecimalArrayQ(decimal[] a, Action $"a={Uri.EscapeDataString(k.ToString())}")); using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4277,7 +4277,7 @@ public decimal GetDecimalSquare(decimal d, Action var requestUri = "api/SuperDemo/DecimalZero"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4361,7 +4361,7 @@ public System.Collections.Generic.IDictionary GetDictionary(Acti var requestUri = "api/SuperDemo/StringStringDic"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4403,7 +4403,7 @@ public System.Collections.Generic.IDictionary GetDictionary(Acti var requestUri = "api/SuperDemo/StringPersonDic"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4446,7 +4446,7 @@ public System.Collections.Generic.IDictionary GetDictionary(Acti var requestUri = "api/SuperDemo/StringPersonDic2"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4489,7 +4489,7 @@ public double Getdouble(Action handl var requestUri = "api/SuperDemo/doulbe"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4533,7 +4533,7 @@ public double GetDoubleZero(Action h var requestUri = "api/SuperDemo/DoubleZero"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4578,7 +4578,7 @@ public DemoWebApi.DemoData.Client.Days[] GetEnumArrayDays(System.Collections.Gen var requestUri = "api/SuperDemo/enumArrayDays?"+String.Join("&", a.Select(k => $"a={Uri.EscapeDataString(k.ToString())}")); using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4622,7 +4622,7 @@ public System.DayOfWeek[] GetEnumArrayQ2(System.Collections.Generic.List $"a={Uri.EscapeDataString(k.ToString())}")); using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4665,7 +4665,7 @@ public float GetFloatZero(Action han var requestUri = "api/SuperDemo/FloatZero"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4707,7 +4707,7 @@ public float GetFloatZero(Action han var requestUri = "api/SuperDemo/ICollection"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4749,7 +4749,7 @@ public float GetFloatZero(Action han var requestUri = "api/SuperDemo/IList"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4792,7 +4792,7 @@ public async Task GetInt2DAsync(Action var requestUri = "api/SuperDemo/int2dJagged"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4880,7 +4880,7 @@ public int[] GetIntArray(Action hand var requestUri = "api/SuperDemo/intArray"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4926,7 +4926,7 @@ public int[] GetIntArrayQ(int[] a, Action $"a={Uri.EscapeDataString(k.ToString())}")); using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -4972,7 +4972,7 @@ public long[] GetIntArrayQ2(System.Collections.Generic.IEnumerable a, Acti var requestUri = "api/SuperDemo/intArrayQ2?"+String.Join("&", a.Select(k => $"a={Uri.EscapeDataString(k.ToString())}")); using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -5015,7 +5015,7 @@ public int GetIntSquare(int d, Action GetNullableDecimal(bool hasValue, Action handleH var requestUri = "api/SuperDemo/short"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -5496,7 +5496,7 @@ public string[] GetStringArrayQ(string[] a, Action $"a={Uri.EscapeDataString(k.ToString())}")); using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -5542,7 +5542,7 @@ public string[] GetStringArrayQ2(System.Collections.Generic.List a, Acti var requestUri = "api/SuperDemo/stringArrayQ2?"+String.Join("&", a.Select(k => $"a={Uri.EscapeDataString(k.ToString())}")); using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -5579,7 +5579,7 @@ public System.Net.Http.HttpResponseMessage GetTextStream(Action handleHea var requestUri = "api/SuperDemo/uint"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -5655,7 +5655,7 @@ public ulong Getulong(Action handleH var requestUri = "api/SuperDemo/ulong"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -5697,7 +5697,7 @@ public ushort GetUShort(Action handl var requestUri = "api/SuperDemo/ushort"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -5729,7 +5729,7 @@ public System.Net.Http.HttpResponseMessage PostActionResult(Action PostWithQueryButEmptyBody(string s, int i, Acti var content = System.Net.Http.Json.JsonContent.Create(s, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -6476,7 +6476,7 @@ public string AthletheSearch(System.Nullable take, int skip, string order, var requestUri = "api/TextData/AthletheSearch?"+(take.HasValue?"take="+take.Value.ToString():String.Empty)+"&skip="+skip+"&order="+(order == null ? "" : Uri.EscapeDataString(order))+"&sort="+(sort == null ? "" : Uri.EscapeDataString(sort))+"&search="+(search == null ? "" : Uri.EscapeDataString(search)); using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -6522,7 +6522,7 @@ public string GetABCDE(Action handle var requestUri = "api/TextData/String"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -6570,7 +6570,7 @@ public string GetEmptyString(Action var requestUri = "api/TextData/EmptyString"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -6620,7 +6620,7 @@ public string GetNullableString(Action h var requestUri = "api/TextData/NullString"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -6741,7 +6741,7 @@ public void A1TupleArray(System.Tuple[] idAndOrderArray, Actio var content = System.Net.Http.Json.JsonContent.Create(idAndOrderArray, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -6785,7 +6785,7 @@ public void A2TupleIEnumerable(System.Collections.Generic.IEnumerable GetTuple1(Action GetTuple2(Action GetTuple3(Action GetTuple4(Action GetTuple5(Action GetTuple6(Actio var requestUri = "api/Tuple/Tuple6"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -7236,7 +7236,7 @@ public System.Tuple GetTuple7 var requestUri = "api/Tuple/Tuple7"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -7282,7 +7282,7 @@ public System.Tuple GetTuple7 var requestUri = "api/Tuple/Tuple8"; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -7330,7 +7330,7 @@ public DemoWebApi.DemoData.Client.Person LinkPeopleCompany2(System.Tuple tuple, Action tuple, Action tuple, Action tuple, Action var content = System.Net.Http.Json.JsonContent.Create(tuple, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -7915,7 +7915,7 @@ public string PostTuple5(System.Tuple tuple var content = System.Net.Http.Json.JsonContent.Create(tuple, mediaType: null, jsonSerializerSettings); httpRequestMessage.Content = content; handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -7965,7 +7965,7 @@ public string PostTuple6(System.Tuple ha var requestUri = "api/Values/"+id; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Delete, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -8169,7 +8169,7 @@ public System.Collections.Generic.IEnumerable Get(Action han var requestUri = "api/Values/"+id; using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri); handleHeaders?.Invoke(httpRequestMessage.Headers); - var responseMessage = client.SendAsync(httpRequestMessage).Result; + var responseMessage = client.Send(httpRequestMessage); try { responseMessage.EnsureSuccessStatusCodeEx(); @@ -8357,7 +8357,7 @@ public System.Collections.Generic.IEnumerable Get2(Action