Skip to content

Commit bed875f

Browse files
committed
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
1 parent 50fde84 commit bed875f

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/ThisAssembly.Resources/CSharp.sbntxt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@
1616
/// => @"{{ $0.Path }}"
1717
{{~ end ~}}
1818
/// </summary>
19+
{{~ if Remarks ~}}
20+
{{ Remarks }}
21+
/// <see cref="{{ Url }}"/>
22+
{{~ end ~}}
23+
{{~ if Warn ~}}
24+
[Obsolete("{{ Warn }}", false
25+
#if NET6_0_OR_GREATER
26+
, UrlFormat = "{{ Url }}"
27+
#endif
28+
)]
29+
{{~ end ~}}
1930
public static partial class {{ $0.Name }}
2031
{
2132
{{~ if $0.IsText ~}}
@@ -57,16 +68,5 @@ namespace {{ Namespace }};
5768
/// <summary>
5869
/// Provides access to assembly resources.
5970
/// </summary>
60-
{{~ if Remarks ~}}
61-
{{ Remarks }}
62-
/// <see cref="{{ Url }}"/>
63-
{{~ end ~}}
64-
{{~ if Warn ~}}
65-
[Obsolete("{{ Warn }}", false
66-
#if NET6_0_OR_GREATER
67-
, UrlFormat = "{{ Url }}"
68-
#endif
69-
)]
70-
{{~ end ~}}
7171
{{ render RootArea }}
7272
}

0 commit comments

Comments
 (0)