From 493571b7953f4cab209ded583d1ada7f0c277f3e Mon Sep 17 00:00:00 2001 From: Oleg Shevchenko Date: Fri, 19 Jan 2024 21:52:42 +0300 Subject: [PATCH] Upgrade SDK to 2023.3 (#104) * Update SDK to 2023.3.0-eap04 * Drop using binding redirects * Revert "Drop using binding redirects" This reverts commit 6fb29bbc2588a6f930b822f151420d08a3eac51e. * Fix build * Update SdkVersion in Directory.Build.props The SdkVersion has been updated from 2023.3.0-eap04 to 2023.3.2 in Directory.Build.props file. This change will ensure the project uses the latest SDK for building. --- .editorconfig | 2 +- Directory.Build.props | 2 +- .../Caching/TemplateParameterNameAttributeProvider.cs | 6 +++++- test/src/app.config | 6 +++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index c9ece79..b6264a0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,5 +9,5 @@ dotnet_separate_import_directive_groups = true dotnet_sort_system_directives_first = true indent_size = 4 -[{*.csproj,*.json,*.yml,*.xml,*.props,*.nuspec}] +[{*.csproj,*.json,*.yml,*.xml,*.props,*.nuspec,*.config}] indent_size = 2 diff --git a/Directory.Build.props b/Directory.Build.props index 9e150ce..e0a1e54 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 2023.2.0 + 2023.3.2 diff --git a/src/ReSharper.Structured.Logging/Caching/TemplateParameterNameAttributeProvider.cs b/src/ReSharper.Structured.Logging/Caching/TemplateParameterNameAttributeProvider.cs index 7a91190..16e8dc3 100644 --- a/src/ReSharper.Structured.Logging/Caching/TemplateParameterNameAttributeProvider.cs +++ b/src/ReSharper.Structured.Logging/Caching/TemplateParameterNameAttributeProvider.cs @@ -10,6 +10,8 @@ namespace ReSharper.Structured.Logging.Caching [CodeAnnotationProvider] public class TemplateParameterNameAttributeProvider : CodeAnnotationInfoProvider { + private const string MessageTemplateFormatMethodAttribute = "MessageTemplateFormatMethodAttribute"; + public TemplateParameterNameAttributeProvider( AttributeInstancesProvider attributeInstancesProvider, CodeAnnotationsConfiguration codeAnnotationsConfiguration) @@ -20,7 +22,7 @@ public TemplateParameterNameAttributeProvider( protected override string CalculateInfo(ITypeMember attributesOwner, IEnumerable attributeInstances) { var templateFormatAttribute = attributeInstances - .FirstOrDefault(a => string.Equals(a.GetAttributeShortName(), "MessageTemplateFormatMethodAttribute", StringComparison.Ordinal)); + .FirstOrDefault(a => string.Equals(a.GetAttributeShortName(), MessageTemplateFormatMethodAttribute, StringComparison.Ordinal)); if (templateFormatAttribute != null) { @@ -47,5 +49,7 @@ protected override string GetDefaultInfo(ITypeMember attributesOwner) { return null; } + + public override string[] AttributeShortNames { get; } = { MessageTemplateFormatMethodAttribute }; } } diff --git a/test/src/app.config b/test/src/app.config index 6e04ae5..b20694e 100644 --- a/test/src/app.config +++ b/test/src/app.config @@ -38,6 +38,10 @@ + + + + - \ No newline at end of file +