Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[TransitionHelper] CancellationTokenSource is disposable and needs handling for clean-up

Đang mở
#407 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
desktop

Hướng nghiên cứu

Bắt đầu bằng cách đọc components/TransitionHelper/src/TransitionHelper.Animation.cs, đặc biệt là trường _currentAnimationCancellationTokenSource và quyền sở hữu của nó bởi TransitionHelper. Chạy bản build CommunityToolkit.Labs.WinUI.TransitionHelper.csproj để tái hiện CA1001; hoàn tất khi tài nguyên có chiến lược dọn dẹp rõ ràng và cảnh báo được xử lý.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

experiment :test_tube: issue 🧪

Issue with an inner disposable reference that needs to be cleaned up by the parent class to avoid the C# compiler warning:

 D:\a\Labs-Windows\Labs-Windows\components\TransitionHelper\src\TransitionHelper.Animation.cs(30,29): error CA1001: Type 'TransitionHelper' owns disposable field(s) '_currentAnimationCancellationTokenSource' but is not disposable [D:\a\Labs-Windows\Labs-Windows\components\TransitionHelper\src\CommunityToolkit.Labs.WinUI.TransitionHelper.csproj]

For now this is ignored. Not sure how we want to handle this as it is a resourced helper...

Originally posted by @michael-hawker in https://github.com/CommunityToolkit/Labs-Windows/issues/354#issuecomment-1444748087

Ngôn ngữ chính
C#
Star
485
Fork
89
Merge trung bình
1 ngày 11 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CommunityToolkit/Labs-Windows

Tất cả issue của CommunityToolkit/Labs-Windows

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.