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

@@ -12,11 +12,11 @@ namespace LibKubernetesGenerator
[Generator]
public class KubernetesClientSourceGenerator : ISourceGenerator
{
private static object execlock = new object();
private static readonly object Execlock = new object();
public void ExecuteInner(GeneratorExecutionContext context)
{
lock (execlock)
lock (Execlock)
{
var swaggerfile = context.AdditionalFiles.First(f => f.Path.EndsWith("swagger.json"));
var swagger = OpenApiDocument.FromJsonAsync(swaggerfile.GetText().ToString()).GetAwaiter().GetResult();
@@ -131,11 +131,11 @@ namespace LibKubernetesGenerator
public void Initialize(GeneratorInitializationContext context)
{
#if DEBUG
// if (!Debugger.IsAttached)
// {
// Debugger.Launch();
// }
// if (!Debugger.IsAttached)
// {
// Debugger.Launch();
// }
#endif
}
}
}
}