From fae4e055697151ad956b5771f037e50737275bb9 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Mon, 30 Sep 2024 10:55:18 -0300 Subject: [PATCH] Avoid duplicate [Obsolete] attribute in Resources Since we extend the partial class for many resources by group, we may end up adding the attribute multiple times --- src/ThisAssembly.Resources/CSharp.sbntxt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ThisAssembly.Resources/CSharp.sbntxt b/src/ThisAssembly.Resources/CSharp.sbntxt index 82b9c55d..961aae6a 100644 --- a/src/ThisAssembly.Resources/CSharp.sbntxt +++ b/src/ThisAssembly.Resources/CSharp.sbntxt @@ -16,6 +16,17 @@ /// => @"{{ $0.Path }}" {{~ end ~}} /// + {{~ if Remarks ~}} + {{ Remarks }} + /// + {{~ end ~}} + {{~ if Warn ~}} + [Obsolete("{{ Warn }}", false + #if NET6_0_OR_GREATER + , UrlFormat = "{{ Url }}" + #endif + )] + {{~ end ~}} public static partial class {{ $0.Name }} { {{~ if $0.IsText ~}} @@ -57,16 +68,5 @@ namespace {{ Namespace }}; /// /// Provides access to assembly resources. /// - {{~ if Remarks ~}} - {{ Remarks }} - /// - {{~ end ~}} - {{~ if Warn ~}} - [Obsolete("{{ Warn }}", false - #if NET6_0_OR_GREATER - , UrlFormat = "{{ Url }}" - #endif - )] - {{~ end ~}} {{ render RootArea }} }