dotnet / dotnet/dotnet-api-docs
The ReferenceEqualityComparer.Instance property is incorrectly shown as nullable
- Lingua principale
- C#
- Stelle
- 949
- Fork
- 1.7k
- Merge medio
- 3g 27m
- PR unite (30g)
- 49
Descrizione
https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.referenceequalitycomparer.instance?view=net-5.0:
> ```cs
> public static System.Collections.Generic.ReferenceEqualityComparer? Instance { get; }
> ```
Having this property be nullable makes no sense. Docs tooling bug maybe? The .NET Core source shows that it's not nullable:
https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs#L30
```cs
///
/// Gets the singleton instance.
///
public static ReferenceEqualityComparer Instance { get; } = new ReferenceEqualityComparer();
```
https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/System.Collections/ref/System.Collections.cs#L418
```cs
public static System.Collections.Generic.ReferenceEqualityComparer Instance { get { throw null; } }
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Confronta la firma nullable di ReferenceEqualityComparer.Instance nella pagina dell'API con le dichiarazioni di runtime in src/libraries/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs e src/libraries/System.Collections/ref/System.Collections.cs. Inizia verificando come gli strumenti di documentazione derivano la firma. L'attività è completata quando il riferimento API generato mostra la proprietà come non nullable.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- documentation
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100