From eddf5c4546e31efd35228e932d1a8660dd6b411d Mon Sep 17 00:00:00 2001 From: Rafal Mielowski Date: Wed, 26 Feb 2025 18:54:57 +0100 Subject: [PATCH] Make local declaration syntax invalid --- .../Compiling/Diagnostics/CompilationErrors.cs | 16 ++++++++-------- src/Core/IoC/CompilerModule.cs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Core/Compiling/Diagnostics/CompilationErrors.cs b/src/Core/Compiling/Diagnostics/CompilationErrors.cs index 258e106..84d89ce 100644 --- a/src/Core/Compiling/Diagnostics/CompilationErrors.cs +++ b/src/Core/Compiling/Diagnostics/CompilationErrors.cs @@ -61,9 +61,9 @@ public static class CompilationErrors description: "Description.", helpLinkUri: "TODO", customTags: ["APIM", "ApiManagement"]); - + public readonly static DiagnosticDescriptor ValueShouldBe = new( - "APIM9995", + "APIM9994", "Value should be", "Value for '{0}' policy should be '{1}' but is not", "PolicyDocumentCompilation", @@ -72,9 +72,9 @@ public static class CompilationErrors description: "Description.", helpLinkUri: "TODO", customTags: ["APIM", "ApiManagement"]); - + public readonly static DiagnosticDescriptor NotSupportedStatement = new( - "APIM9994", + "APIM9993", "Not supported statement", "Statement '{0}' is not supported in policy document", "PolicyDocumentCompilation", @@ -83,9 +83,9 @@ public static class CompilationErrors description: "Description.", helpLinkUri: "TODO", customTags: ["APIM", "ApiManagement"]); - + public readonly static DiagnosticDescriptor ExpressionNotSupported = new( - "APIM9993", + "APIM9992", "Not supported expression", "Expression of type '{0}' not supported in policy document. Only '{1}' is supported.", "PolicyDocumentCompilation", @@ -94,9 +94,9 @@ public static class CompilationErrors description: "Description.", helpLinkUri: "TODO", customTags: ["APIM", "ApiManagement"]); - + public readonly static DiagnosticDescriptor MethodNotSupported = new( - "APIM9992", + "APIM9991", "Not supported method", "Method '{0}' not supported in policy document", "PolicyDocumentCompilation", diff --git a/src/Core/IoC/CompilerModule.cs b/src/Core/IoC/CompilerModule.cs index 0f1e892..83b12fe 100644 --- a/src/Core/IoC/CompilerModule.cs +++ b/src/Core/IoC/CompilerModule.cs @@ -48,7 +48,7 @@ public static IServiceCollection AddSyntaxCompilers(this IServiceCollection serv return services .AddSingleton() .AddSingleton() - .AddSingleton() + // .AddSingleton() .AddSingleton(); } } \ No newline at end of file