-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add OverloadResolutionPriorityAttribute
- Loading branch information
1 parent
46216fb
commit e437643
Showing
4 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
**API count: 328** | ||
**API count: 329** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// <auto-generated /> | ||
#pragma warning disable | ||
|
||
#if !NET9_0_OR_GREATER | ||
|
||
namespace System.Runtime.CompilerServices; | ||
|
||
using System.Diagnostics; | ||
using System.Diagnostics.CodeAnalysis; | ||
using Link = System.ComponentModel.DescriptionAttribute; | ||
|
||
/// <summary> | ||
/// Specifies the priority of a member in overload resolution. When unspecified, the default priority is 0. | ||
/// </summary> | ||
[ExcludeFromCodeCoverage] | ||
[DebuggerNonUserCode] | ||
[AttributeUsage( | ||
AttributeTargets.Method | | ||
AttributeTargets.Constructor | | ||
AttributeTargets.Property, | ||
Inherited = false)] | ||
#if PolyPublic | ||
public | ||
#endif | ||
sealed class OverloadResolutionPriorityAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="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) => | ||
Priority = priority; | ||
|
||
/// <summary> | ||
/// The priority of the member. | ||
/// </summary> | ||
public int Priority { get; } | ||
} | ||
#endif |