Skip to content

Commit b71f56f

Browse files
teo-tsirpanisSergio0694
authored andcommitted
Adapt the attributes to the codebase's standards.
1 parent 32ac9c8 commit b71f56f

6 files changed

+56
-27
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// <auto-generated/>
2+
#pragma warning disable
3+
#nullable enable annotations
4+
15
// Licensed to the .NET Foundation under one or more agreements.
26
// The .NET Foundation licenses this file to you under the MIT license.
37

@@ -12,29 +16,26 @@ namespace System.Diagnostics.CodeAnalysis
1216
/// annotated as requiring that feature, when the callsite is guarded by a
1317
/// call to the property.
1418
/// </remarks>
15-
[AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
16-
#if SYSTEM_PRIVATE_CORELIB
17-
public
18-
#else
19-
internal
20-
#endif
21-
sealed class FeatureGuardAttribute : Attribute
19+
[global::System.AttributeUsage(global::System.AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
20+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
21+
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")]
22+
internal sealed class FeatureGuardAttribute : global::System.Attribute
2223
{
2324
/// <summary>
24-
/// Initializes a new instance of the <see cref="FeatureGuardAttribute"/> class
25+
/// Initializes a new instance of the <see cref="global::System.Diagnostics.CodeAnalysis.FeatureGuardAttribute"/> class
2526
/// with the specified feature type.
2627
/// </summary>
2728
/// <param name="featureType">
2829
/// The type that represents the feature guarded by the property.
2930
/// </param>
30-
public FeatureGuardAttribute(Type featureType)
31+
public FeatureGuardAttribute(global::System.Type featureType)
3132
{
3233
FeatureType = featureType;
3334
}
3435

3536
/// <summary>
3637
/// The type that represents the feature guarded by the property.
3738
/// </summary>
38-
public Type FeatureType { get; }
39+
public global::System.Type FeatureType { get; }
3940
}
4041
}

src/PolySharp.SourceGenerators/EmbeddedResources/RuntimeSupported/System.Diagnostics.CodeAnalysis.FeatureSwitchDefinitionAttribute.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// <auto-generated/>
2+
#pragma warning disable
3+
#nullable enable annotations
4+
15
// Licensed to the .NET Foundation under one or more agreements.
26
// The .NET Foundation licenses this file to you under the MIT license.
37

@@ -11,16 +15,13 @@ namespace System.Diagnostics.CodeAnalysis
1115
/// IL rewriters and compilers can use this to substitute the return value
1216
/// of the specified property with the value of the feature switch.
1317
/// </remarks>
14-
[AttributeUsage(AttributeTargets.Property, Inherited = false)]
15-
#if SYSTEM_PRIVATE_CORELIB
16-
public
17-
#else
18-
internal
19-
#endif
20-
sealed class FeatureSwitchDefinitionAttribute : Attribute
18+
[global::System.AttributeUsage(global::System.AttributeTargets.Property, Inherited = false)]
19+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
20+
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")]
21+
internal sealed class FeatureSwitchDefinitionAttribute : global::System.Attribute
2122
{
2223
/// <summary>
23-
/// Initializes a new instance of the <see cref="FeatureSwitchDefinitionAttribute"/> class
24+
/// Initializes a new instance of the <see cref="global::System.Diagnostics.CodeAnalysis.FeatureSwitchDefinitionAttribute"/> class
2425
/// with the specified feature switch name.
2526
/// </summary>
2627
/// <param name="switchName">

src/PolySharp.SourceGenerators/EmbeddedResources/RuntimeSupported/System.Diagnostics.DebuggerDisableUserUnhandledExceptionsAttribute.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// <auto-generated/>
2+
#pragma warning disable
3+
#nullable enable annotations
4+
15
// Licensed to the .NET Foundation under one or more agreements.
26
// The .NET Foundation licenses this file to you under the MIT license.
37

@@ -8,8 +12,10 @@ namespace System.Diagnostics
812
/// this attribute will prevent the debugger from breaking on user-unhandled exceptions when the
913
/// exception is caught by a method with this attribute, unless BreakForUserUnhandledException is called.
1014
/// </summary>
11-
[AttributeUsage(AttributeTargets.Method)]
12-
public sealed class DebuggerDisableUserUnhandledExceptionsAttribute : Attribute
15+
[global::System.AttributeUsage(global::System.AttributeTargets.Method)]
16+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
17+
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")]
18+
internal sealed class DebuggerDisableUserUnhandledExceptionsAttribute : global::System.Attribute
1319
{
1420
}
1521
}

src/PolySharp.SourceGenerators/EmbeddedResources/RuntimeSupported/System.Runtime.InteropServices.WasmImportLinkageAttribute.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// <auto-generated/>
2+
#pragma warning disable
3+
#nullable enable annotations
4+
15
// Licensed to the .NET Foundation under one or more agreements.
26
// The .NET Foundation licenses this file to you under the MIT license.
37

@@ -9,8 +13,10 @@ namespace System.Runtime.InteropServices
913
/// <remarks>
1014
/// See https://webassembly.github.io/spec/core/syntax/modules.html#imports.
1115
/// </remarks>
12-
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
13-
public sealed class WasmImportLinkageAttribute : Attribute
16+
[global::System.AttributeUsage(global::System.AttributeTargets.Method, Inherited = false)]
17+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
18+
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")]
19+
internal sealed class WasmImportLinkageAttribute : global::System.Attribute
1420
{
1521
/// <summary>
1622
/// Instance constructor.

src/PolySharp.SourceGenerators/EmbeddedResources/System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// <auto-generated/>
2+
#pragma warning disable
3+
#nullable enable annotations
4+
15
// Licensed to the .NET Foundation under one or more agreements.
26
// The .NET Foundation licenses this file to you under the MIT license.
37

@@ -6,11 +10,17 @@ namespace System.Runtime.CompilerServices
610
/// <summary>
711
/// Specifies the priority of a member in overload resolution. When unspecified, the default priority is 0.
812
/// </summary>
9-
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
10-
public sealed class OverloadResolutionPriorityAttribute : Attribute
13+
[global::System.AttributeUsage(
14+
global::System.AttributeTargets.Method |
15+
global::System.AttributeTargets.Constructor |
16+
global::System.AttributeTargets.Property,
17+
AllowMultiple = false,
18+
Inherited = false)]
19+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
20+
internal sealed class OverloadResolutionPriorityAttribute : global::System.Attribute
1121
{
1222
/// <summary>
13-
/// Initializes a new instance of the <see cref="OverloadResolutionPriorityAttribute"/> class.
23+
/// Initializes a new instance of the <see cref="global::System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute"/> class.
1424
/// </summary>
1525
/// <param name="priority">The priority of the attributed member. Higher numbers are prioritized, lower numbers are deprioritized. 0 is the default if no attribute is present.</param>
1626
public OverloadResolutionPriorityAttribute(int priority)
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// <auto-generated/>
2+
#pragma warning disable
3+
#nullable enable annotations
4+
15
// Licensed to the .NET Foundation under one or more agreements.
26
// The .NET Foundation licenses this file to you under the MIT license.
37

@@ -6,8 +10,9 @@ namespace System.Runtime.CompilerServices
610
/// <summary>
711
/// Indicates that a method will allow a variable number of arguments in its invocation.
812
/// </summary>
9-
[AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
10-
public sealed class ParamCollectionAttribute : Attribute
13+
[global::System.AttributeUsage(global::System.AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
14+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
15+
internal sealed class ParamCollectionAttribute : global::System.Attribute
1116
{
1217
}
1318
}

0 commit comments

Comments
 (0)