Repository navigation
Use shared clipboard code - #10544
Conversation
There was a problem hiding this comment.
PR Overview
This pull request switches the clipboard implementation to use shared clipboard code from System.Private.Windows.Core, exposing new typed and JSON APIs while removing unused code.
- Updated global suppressions for new clipboard-related members
- Refactored System.Drawing helper methods with nullable annotations and updated signature types
- Added new global using directives for clipboard-related types
Reviewed Changes
| File | Description |
|---|---|
| src/Microsoft.DotNet.Wpf/src/PresentationCore/GlobalSuppressions.cs | Added suppressions for new clipboard API members |
| src/Microsoft.DotNet.Wpf/src/Extensions/PresentationFramework-SystemDrawing/SystemDrawingExtension.cs | Refactored helper methods with nullable support and updated API usage |
| src/Microsoft.DotNet.Wpf/src/PresentationCore/GlobalUsings.cs | Introduced new global usings for shared clipboard and related functionality |
| src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SystemDrawingHelper.cs | Updated helper methods to align with new System.Drawing API signatures |
Copilot reviewed 107 out of 107 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/SystemDrawingHelper.cs:28
- Consider using a named null handle constant (e.g., HENHMETAFILE.Null) instead of the literal 0 for clarity and consistency with other methods that return HBITMAP.Null.
internal static HENHMETAFILE GetHandleFromMetafile(object? data) => (HENHMETAFILE)(AssemblyHelper.ExtensionsForSystemDrawing()?.GetHandleFromMetafile(data) ?? 0);
068f0a1 to
0476230
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10544 +/- ##
===================================================
- Coverage 11.21623% 10.96190% -0.25433%
===================================================
Files 3353 3310 -43
Lines 668041 664693 -3348
Branches 74980 74667 -313
===================================================
- Hits 74929 72863 -2066
+ Misses 591866 590690 -1176
+ Partials 1246 1140 -106
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
harshit7962
left a comment
There was a problem hiding this comment.
Still going through the PR, posting the review to get current queries/nits addressed.
0476230 to
fe05d80
Compare
|
@h3xds1nz I'll respond to your feedback when I rebase tomorrow |
Bring code closer to current standards.
Switch to using a typed dictionary. Extra fields in DataStoreEntry were never used. Removed to align with shared implementation.
This commit switches to using the shared clipboard code coming from System.Private.Windows.Core and exposes the new typed and JSON APIs. Removes all code no longer used.
Remove duplicate project file entry
af68eeb to
0b54126
Compare
…lipboard.cs Co-authored-by: Harshit <[email protected]>
This PR switches to using the shared clipboard code coming from System.Private.Windows.Core and exposes the new typed and JSON APIs.
Removes all code no longer used.
The PR includes the existing refactoring PR. The final commit is the actual clipboard change.
Microsoft Reviewers: Open in CodeFlow