Skip to content

Commit 59c67f0

Browse files
committed
Add IReadOnlySet for .NET 5+
1 parent 66a2861 commit 59c67f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Lucene.Net/Support/ConcurrentHashSet.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3232
using System.Runtime.CompilerServices;
3333
using System.Threading;
3434
using JCG = J2N.Collections.Generic;
35+
// ReSharper disable RedundantExtendsListEntry
3536
#nullable enable
3637

3738
namespace Lucene.Net.Support
@@ -45,8 +46,10 @@ namespace Lucene.Net.Support
4546
/// concurrently from multiple threads.
4647
/// </remarks>
4748
[DebuggerDisplay("Count = {Count}")]
48-
// ReSharper disable once RedundantExtendsListEntry
4949
internal class ConcurrentHashSet<T> : ISet<T>, IReadOnlyCollection<T>, ICollection<T>
50+
#if FEATURE_READONLYSET
51+
, IReadOnlySet<T>
52+
#endif
5053
{
5154
private const int DefaultCapacity = 31;
5255
private const int MaxLockNumber = 1024;

0 commit comments

Comments
 (0)