-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Clipboard and DataObject code to Core #12868
Conversation
Moves some logic to helpers in Core.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12868 +/- ##
===================================================
+ Coverage 76.13091% 76.13584% +0.00493%
===================================================
Files 3249 3251 +2
Lines 642492 642520 +28
Branches 47284 47286 +2
===================================================
+ Hits 489135 489188 +53
+ Misses 149814 149791 -23
+ Partials 3543 3541 -2
Flags with carried forward coverage won't be shown. Click here to find out more. |
src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.cs
Outdated
Show resolved
Hide resolved
src/System.Private.Windows.Core/src/System/Private/Windows/Ole/ClipboardCore.cs
Outdated
Show resolved
Hide resolved
src/System.Private.Windows.Core/src/System/Private/Windows/Ole/IOleServices.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 15 changed files in this pull request and generated no comments.
Files not reviewed (10)
- src/System.Private.Windows.Core/src/System/Private/Windows/Runtime.cs: Evaluated as low risk
- src/System.Windows.Forms/src/GlobalUsings.cs: Evaluated as low risk
- src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataFormats.cs: Evaluated as low risk
- src/System.Private.Windows.Core/src/System/Private/Windows/Ole/DataStore.DataStoreEntry.cs: Evaluated as low risk
- src/System.Private.Windows.Core/src/System/Private/Windows/Ole/DataStore.cs: Evaluated as low risk
- src/System.Private.Windows.Core/src/System/Private/Windows/Ole/IOleServices.cs: Evaluated as low risk
- src/System.Windows.Forms/src/System/Windows/Forms/OLE/Clipboard.cs: Evaluated as low risk
- src/System.Windows.Forms/src/GlobalSuppressions.cs: Evaluated as low risk
- src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.cs: Evaluated as low risk
- src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ClipboardTests.cs: Evaluated as low risk
Comments suppressed due to low confidence (7)
src/System.Private.Windows.Core/src/System/Private/Windows/Ole/DataObjectCore.cs:21
- Ensure that the behavior of TryJsonSerialize, especially the InvalidOperationException for TDataObject, is covered by tests.
internal static object TryJsonSerialize<T>(string format, T data)
src/System.Private.Windows.Core/src/System/Private/Windows/Ole/DataObjectCore.cs:46
- Ensure that the CreateComposition method handles all possible cases correctly, particularly the application of the adapterFactory function.
internal static Composition<TRuntime, TDataFormat> CreateComposition(object data, Func<TIDataObject, IDataObjectInternal> adapterFactory)
src/System.Private.Windows.Core/src/System/Private/Windows/Ole/ClipboardCore.cs:30
- Ensure that the EnsureThreadState method is correctly implemented in classes implementing IOleServices.
TOleServices.EnsureThreadState();
src/System.Private.Windows.Core/src/System/Private/Windows/Ole/ClipboardCore.cs:180
- Ensure that the IsValidTypeForFormat method in TOleServices is correctly implemented and that the call from ClipboardCore is valid.
TOleServices.IsValidTypeForFormat(type, format)
src/System.Private.Windows.Core/src/System/Private/Windows/Ole/ClipboardCore.cs:71
- Confirm that the PInvoke calls (OleSetClipboard and OleFlushClipboard) are correct and that the retry logic is robust and handles errors appropriately.
while ((result = PInvokeCore.OleSetClipboard(iDataObject)).Failed)
src/System.Private.Windows.Core/src/System/Private/Windows/Ole/ClipboardCore.cs:114
- Confirm that the PInvoke call (OleGetClipboard) is correct and that the proxy handling and retry logic are correct.
while ((result = PInvokeCore.OleGetClipboard(proxyDataObject)).Failed)
src/System.Windows.Forms/src/System/Windows/Forms/OLE/WinFormsOleServices.cs:103
- The visibility of the method
TryGetBitmapData
has been changed from private to static. This change should be reviewed to ensure it was intentional.
static unsafe bool TryGetBitmapData(Com.IDataObject* dataObject, [NotNullWhen(true)] out Bitmap? data)
Moves some logic to helpers in Core.
Microsoft Reviewers: Open in CodeFlow