Skip to content

Commit

Permalink
Adapt the attributes to the codebase's standards.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis authored and Sergio0694 committed Nov 19, 2024
1 parent 32ac9c8 commit b71f56f
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// <auto-generated/>
#pragma warning disable
#nullable enable annotations

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

Expand All @@ -12,29 +16,26 @@ namespace System.Diagnostics.CodeAnalysis
/// annotated as requiring that feature, when the callsite is guarded by a
/// call to the property.
/// </remarks>
[AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
#if SYSTEM_PRIVATE_CORELIB
public
#else
internal
#endif
sealed class FeatureGuardAttribute : Attribute
[global::System.AttributeUsage(global::System.AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")]
internal sealed class FeatureGuardAttribute : global::System.Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="FeatureGuardAttribute"/> class
/// Initializes a new instance of the <see cref="global::System.Diagnostics.CodeAnalysis.FeatureGuardAttribute"/> class
/// with the specified feature type.
/// </summary>
/// <param name="featureType">
/// The type that represents the feature guarded by the property.
/// </param>
public FeatureGuardAttribute(Type featureType)
public FeatureGuardAttribute(global::System.Type featureType)
{
FeatureType = featureType;
}

/// <summary>
/// The type that represents the feature guarded by the property.
/// </summary>
public Type FeatureType { get; }
public global::System.Type FeatureType { get; }
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// <auto-generated/>
#pragma warning disable
#nullable enable annotations

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

Expand All @@ -11,16 +15,13 @@ namespace System.Diagnostics.CodeAnalysis
/// IL rewriters and compilers can use this to substitute the return value
/// of the specified property with the value of the feature switch.
/// </remarks>
[AttributeUsage(AttributeTargets.Property, Inherited = false)]
#if SYSTEM_PRIVATE_CORELIB
public
#else
internal
#endif
sealed class FeatureSwitchDefinitionAttribute : Attribute
[global::System.AttributeUsage(global::System.AttributeTargets.Property, Inherited = false)]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")]
internal sealed class FeatureSwitchDefinitionAttribute : global::System.Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="FeatureSwitchDefinitionAttribute"/> class
/// Initializes a new instance of the <see cref="global::System.Diagnostics.CodeAnalysis.FeatureSwitchDefinitionAttribute"/> class
/// with the specified feature switch name.
/// </summary>
/// <param name="switchName">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// <auto-generated/>
#pragma warning disable
#nullable enable annotations

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

Expand All @@ -8,8 +12,10 @@ namespace System.Diagnostics
/// this attribute will prevent the debugger from breaking on user-unhandled exceptions when the
/// exception is caught by a method with this attribute, unless BreakForUserUnhandledException is called.
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
public sealed class DebuggerDisableUserUnhandledExceptionsAttribute : Attribute
[global::System.AttributeUsage(global::System.AttributeTargets.Method)]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")]
internal sealed class DebuggerDisableUserUnhandledExceptionsAttribute : global::System.Attribute
{
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// <auto-generated/>
#pragma warning disable
#nullable enable annotations

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

Expand All @@ -9,8 +13,10 @@ namespace System.Runtime.InteropServices
/// <remarks>
/// See https://webassembly.github.io/spec/core/syntax/modules.html#imports.
/// </remarks>
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class WasmImportLinkageAttribute : Attribute
[global::System.AttributeUsage(global::System.AttributeTargets.Method, Inherited = false)]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.Diagnostics.Conditional("MULTI_TARGETING_SUPPORT_ATTRIBUTES")]
internal sealed class WasmImportLinkageAttribute : global::System.Attribute
{
/// <summary>
/// Instance constructor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// <auto-generated/>
#pragma warning disable
#nullable enable annotations

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

Expand All @@ -6,11 +10,17 @@ namespace System.Runtime.CompilerServices
/// <summary>
/// Specifies the priority of a member in overload resolution. When unspecified, the default priority is 0.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
public sealed class OverloadResolutionPriorityAttribute : Attribute
[global::System.AttributeUsage(
global::System.AttributeTargets.Method |
global::System.AttributeTargets.Constructor |
global::System.AttributeTargets.Property,
AllowMultiple = false,
Inherited = false)]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class OverloadResolutionPriorityAttribute : global::System.Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="OverloadResolutionPriorityAttribute"/> class.
/// Initializes a new instance of the <see cref="global::System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute"/> class.
/// </summary>
/// <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>
public OverloadResolutionPriorityAttribute(int priority)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// <auto-generated/>
#pragma warning disable
#nullable enable annotations

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

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

0 comments on commit b71f56f

Please sign in to comment.