Skip to content

Commit

Permalink
Avoid duplicate [Obsolete] attribute in Resources
Browse files Browse the repository at this point in the history
Since we extend the partial class for many resources by group, we may end up adding the attribute multiple times
  • Loading branch information
kzu committed Sep 30, 2024
1 parent 50fde84 commit fae4e05
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/ThisAssembly.Resources/CSharp.sbntxt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@
/// => @"{{ $0.Path }}"
{{~ end ~}}
/// </summary>
{{~ if Remarks ~}}
{{ Remarks }}
/// <see cref="{{ Url }}"/>
{{~ end ~}}
{{~ if Warn ~}}
[Obsolete("{{ Warn }}", false
#if NET6_0_OR_GREATER
, UrlFormat = "{{ Url }}"
#endif
)]
{{~ end ~}}
public static partial class {{ $0.Name }}
{
{{~ if $0.IsText ~}}
Expand Down Expand Up @@ -57,16 +68,5 @@ namespace {{ Namespace }};
/// <summary>
/// Provides access to assembly resources.
/// </summary>
{{~ if Remarks ~}}
{{ Remarks }}
/// <see cref="{{ Url }}"/>
{{~ end ~}}
{{~ if Warn ~}}
[Obsolete("{{ Warn }}", false
#if NET6_0_OR_GREATER
, UrlFormat = "{{ Url }}"
#endif
)]
{{~ end ~}}
{{ render RootArea }}
}

0 comments on commit fae4e05

Please sign in to comment.