dotnet / dotnet/dotnet-api-docs
The ReferenceEqualityComparer.Instance property is incorrectly shown as nullable
- Ngôn ngữ chính
- C#
- Star
- 950
- Fork
- 1.7k
- Merge trung bình
- 2 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 52
Mô tả
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; } }
```
Hướng dẫn đóng góp
Hướng nghiên cứu
So sánh chữ ký nullable của ReferenceEqualityComparer.Instance trên trang API với các khai báo runtime trong src/libraries/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs và src/libraries/System.Collections/ref/System.Collections.cs. Trước tiên, hãy kiểm tra cách các công cụ tài liệu suy ra chữ ký. Hoàn thành khi tài liệu tham chiếu API được tạo hiển thị thuộc tính là non-nullable.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp
- Lĩnh vực
- documentation
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 45/100