Skip to content

Refactor Clipboard code to internal interface - #12833

Merged
JeremyKuhne merged 5 commits into
dotnet:mainfrom
JeremyKuhne:factorclip3
Jan 24, 2025
Merged

JeremyKuhne merged 5 commits into
dotnet:mainfrom
JeremyKuhne:factorclip3

Conversation

@JeremyKuhne

@JeremyKuhne JeremyKuhne commented Jan 23, 2025 •

Copy link
Copy Markdown
Member

This refactors the Clipboard code to utilize an internal interface to facilitate moving most logic to the Core assembly.

  • Add and utilize IDataObjectInternal that "composes" ITypedDataObject and IDataObject
  • Move mapped formats to DataFormatNames
  • Move RestrictedTypeDesrializationException
  • De-nest internal DataObject classes to prepare for moving
  • Add DataObject derived internal class for tracking user provided data
Microsoft Reviewers: Open in CodeFlow

This refactors the Clipboard code to utilize an internal interface to facilitate moving most logic to the Core assembly.

- Add and utilize IDataObjectInternal that "composes" ITypedDataObject and IDataObject
- Move mapped formats to DataFormatNames
- Move RestrictedTypeDesrializationException
- De-nest internal DataObject classes to prepare for moving
- Add DataObject derived internal class for tracking user provided data
@codecov

codecov Bot commented Jan 23, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 80.64291% with 277 lines in your changes missing coverage. Please review.

Project coverage is 76.12855%. Comparing base (8033c98) to head (1cdd6d3).
Report is 20 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12833         +/-   ##
===================================================
- Coverage   76.20897%   76.12855%   -0.08042%     
===================================================
  Files           3198        3235         +37     
  Lines         640464      642127       +1663     
  Branches       47220       47256         +36     
===================================================
+ Hits          488091      488842        +751     
- Misses        148842      149752        +910     
- Partials        3531        3533          +2     
Flag Coverage Δ
Debug 76.12855% <80.64291%> (-0.08042%) ⬇️
integration 18.09843% <31.04181%> (-0.06783%) ⬇️
production 50.06936% <80.36853%> (-0.07194%) ⬇️
test 96.98488% <100.00000%> (-0.05757%) ⬇️
unit 47.51242% <79.16371%> (-0.05309%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 17 out of 32 changed files in this pull request and generated 2 comments.

Files not reviewed (15)
  • src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.RestrictedTypeDeserializationException.cs: Evaluated as low risk
  • src/System.Private.Windows.Core/src/System/Private/Windows/Core/Ole/DataFormatNames.cs: Evaluated as low risk
  • src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.Composition.NativeToWinFormsAdapter.cs: Evaluated as low risk
  • src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.Composition.RuntimeToNativeAdapter.cs: Evaluated as low risk
  • src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.Composition.TypeNameComparer.cs: Evaluated as low risk
  • src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/Control.ActiveXImpl.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.Composition.cs: Evaluated as low risk
  • src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.Composition.NativeToRuntimeAdapter.cs: Evaluated as low risk
  • src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.cs: Evaluated as low risk
  • src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.Composition.BinaryFormatUtilities.cs: Evaluated as low risk
  • src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.Composition.Binder.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/System/Windows/Forms/OLE/DataObject.Composition.WinFormsToNativeAdapter.cs: Evaluated as low risk
  • src/System.Windows.Forms/src/System/Windows/Forms/OLE/DataObject.DataStore.DataStoreEntry.cs: Evaluated as low risk

@JeremyKuhne
JeremyKuhne enabled auto-merge (squash) January 24, 2025 00:42
@JeremyKuhne
JeremyKuhne merged commit e3f172f into dotnet:main Jan 24, 2025
@dotnet-policy-service dotnet-policy-service Bot added this to the 10.0 Preview1 milestone Jan 24, 2025
@JeremyKuhne
JeremyKuhne deleted the factorclip3 branch January 24, 2025 01:08
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants