From bfef443702cd35a575d72a32bf9c6bea8ff51044 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 20:01:42 +0000 Subject: [PATCH] style: format code with dotnet-format Format code with dotnet-format This commit fixes the style issues introduced in a0e27b9 according to the output from dotnet-format. Details: None --- .../src/CompileTimeComputationGenerator.cs | 131 ++++++++++-------- src/CompileTimeComputation/src/Constants.cs | 25 ++-- 2 files changed, 85 insertions(+), 71 deletions(-) diff --git a/src/CompileTimeComputation/src/CompileTimeComputationGenerator.cs b/src/CompileTimeComputation/src/CompileTimeComputationGenerator.cs index e9f707f..66de306 100644 --- a/src/CompileTimeComputation/src/CompileTimeComputationGenerator.cs +++ b/src/CompileTimeComputation/src/CompileTimeComputationGenerator.cs @@ -63,79 +63,90 @@ public static void Execute(SourceProductionContext context, (ImmutableArray ctx.AddSource("error.g.cs", $@"/* + catch (Exception ex) +{ + RegisterPostInitializationOutput(ctx => ctx.AddSource("error.g.cs", $@"/* {ex.GetType()}: {ex.Message} {ex.StackTrace} -*/")); - } - return "NO RESULT"; +*/")); +} +return "NO RESULT"; } } diff --git a/src/CompileTimeComputation/src/Constants.cs b/src/CompileTimeComputation/src/Constants.cs index 54568ec..04b6073 100644 --- a/src/CompileTimeComputation/src/Constants.cs +++ b/src/CompileTimeComputation/src/Constants.cs @@ -52,17 +52,20 @@ public static class Constants public const string CompileTimeComputationClassDeclaration = $$$""" - {{{GeneratedCodeAttributes}}} - [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)] - public sealed class {{{CompileTimeComputationOfT}}} : Attribute - { - public {{{CompileTimeComputation}}}(string name) - { - Name = name; - } - - - public string Name { get; } + {{{GeneratedCodeAttributes +} +}} + [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)] +public sealed class {{ { CompileTimeComputationOfT} }} : Attribute +{ + public +{ { { CompileTimeComputation} } } (string name) + { + Name = name; +} + + +public string Name { get; } } """; }