Standardization of using order and object initialization (#1028)

* Code cleanup KubernetesClient

* KubernetesClient.Basic code cleanup

* KubernetesClient.Models cleanup

* LibKubernetesGenerator code cleanup

* Improved readability of object initialization

* FIx namespace order

* Fixed some compilation warning
This commit is contained in:
Manuel Menegazzo
2022-09-28 22:34:32 +02:00
committed by GitHub
parent bbd3b6cd50
commit 3702fd6e90
47 changed files with 201 additions and 165 deletions

View File

@@ -35,9 +35,9 @@ namespace @namespace
{
foreach (var innerEx in ex.InnerExceptions)
{
if (innerEx is k8s.Autorest.HttpOperationException)
if (innerEx is k8s.Autorest.HttpOperationException exception)
{
var code = ((k8s.Autorest.HttpOperationException)innerEx).Response.StatusCode;
var code = exception.Response.StatusCode;
if (code == HttpStatusCode.NotFound)
{
return;