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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user