Skip to content
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

Refactor DataFormats #12802

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Refactor DataFormats #12802

merged 2 commits into from
Jan 17, 2025

Conversation

JeremyKuhne
Copy link
Member

@JeremyKuhne JeremyKuhne commented Jan 17, 2025

Prepare DataFormats to move core implementation to share with WPF.

This splits the format list into two collections. The first is the known predefined format ids that come from Windows headers. The second collection contains ones that must be looked up. This optimizes allocations for typical user scenarios in WinForms and WPF.

An internal interface is used to abstract the Format class.

Next PR will move the shared logic into the shared assembly.

Microsoft Reviewers: Open in CodeFlow

Prepare DataFormats to move core implementation to share with WPF.

This splits the format list into two collections. The first is the known predefined format ids that come from Windows headers. The second collection contains ones that must be looked up. This optimizes allocations for typical user scenarios in WinForms and WPF.

An internal interface is used to abstract the Format class.

Next PR will move the shared logic into the shared assembly.
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.20955%. Comparing base (c00d772) to head (d1e4566).
Report is 7 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12802         +/-   ##
===================================================
+ Coverage   76.19998%   76.20955%   +0.00956%     
===================================================
  Files           3197        3197                 
  Lines         640529      640467         -62     
  Branches       47242       47221         -21     
===================================================
+ Hits          488083      488097         +14     
+ Misses        148913      148845         -68     
+ Partials        3533        3525          -8     
Flag Coverage Δ
Debug 76.20955% <100.00000%> (+0.00956%) ⬆️
integration 18.16148% <97.18310%> (+0.00622%) ⬆️
production 50.14745% <100.00000%> (+0.00842%) ⬆️
test 97.03880% <ø> (+0.01435%) ⬆️
unit 47.57379% <100.00000%> (+0.00670%) ⬆️

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

/// <summary>
/// Typed interface for a data format that allows for creation.
/// </summary>
internal interface IDataFormat<T> : IDataFormat
Copy link
Member

Choose a reason for hiding this comment

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

Got to remember this as something that can be done, nice!

@JeremyKuhne JeremyKuhne enabled auto-merge (squash) January 17, 2025 19:04
@JeremyKuhne JeremyKuhne merged commit 2b2ce68 into dotnet:main Jan 17, 2025
8 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview1 milestone Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants