Sergio0694 / PolySharp

PolySharp provides generated, source-only polyfills for C# language features, to easily use all runtime-agnostic features downlevel. Add a reference, set your C# version to latest and have fun! 🚀
MIT License
1.77k stars 46 forks source link

Add `System.Collections.Generic.PriorityQueue<TElement, TPriority>` polyfill #79

Open latonz opened 1 year ago

latonz commented 1 year ago

Description

Add a polyfill for the System.Collections.Generic.PriorityQueue<TElement, TPriority> added in .NET 6.0.

Rationale

Polyfilling System.Collections.Generic.PriorityQueue<TElement, TPriority> helps developers using the same priority queue API in older tfms without the need for preprocessor directives.

Proposed API

According to the .NET 7.0 implementation.

Drawbacks

Another polyfill to maintain.

Alternatives

Not supporting System.Collections.Generic.PriorityQueue<TElement, TPriority>