Skip to content

Commit

Permalink
add OverloadResolutionPriorityAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Aug 15, 2024
1 parent 46216fb commit e437643
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apiCount.include.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
**API count: 328**
**API count: 329**
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The package targets `netstandard2.0` and is designed to support the following ru
* `net5.0`, `net6.0`, `net7.0`, `net8.0`, `net9.0`


**API count: 328**<!-- singleLineInclude: apiCount. path: /apiCount.include.md -->
**API count: 329**<!-- singleLineInclude: apiCount. path: /apiCount.include.md -->


**See [Milestones](../../milestones?state=closed) for release notes.**
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>6.2.3</Version>
<Version>6.3.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>Polyfill</PackageTags>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
Expand Down
39 changes: 39 additions & 0 deletions src/Polyfill/OverloadResolutionPriorityAttribute.cs
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

0 comments on commit e437643

Please sign in to comment.