Skip to content

ApplicationData: Refactor to dual-type pattern for packaged/unpackaged#6378

Open
Scottj1s wants to merge 1 commit intomainfrom
refactor/applicationdata-dual-type
Open

ApplicationData: Refactor to dual-type pattern for packaged/unpackaged#6378
Scottj1s wants to merge 1 commit intomainfrom
refactor/applicationdata-dual-type

Conversation

@Scottj1s
Copy link
Copy Markdown
Member

@Scottj1s Scottj1s commented Apr 4, 2026

Replace runtime branching (if m_unpackagedApplicationData) with separate WinRT implementation types. Both ApplicationData and UnpackagedApplicationData now derive directly from ApplicationDataT, and the factory constructs the appropriate type. Same pattern applied to ApplicationDataContainer.

This eliminates 17+ repeated if-checks, removes the shared_ptr indirection for containers, and makes each type self-contained with no branching.

A microsoft employee must use /azp run to validate using the pipelines below.

WARNING:
Comments made by azure-pipelines bot maybe inaccurate.
Please see pipeline link to verify that the build is being ran.

For status checks on the main branch, please use TransportPackage-Foundation-PR
(https://microsoft.visualstudio.com/ProjectReunion/_build?definitionId=81063&_a=summary)
and run the build against your PR branch with the default parameters.

Replace runtime branching (if m_unpackagedApplicationData) with separate
WinRT implementation types. Both ApplicationData and UnpackagedApplicationData
now derive directly from ApplicationDataT, and the factory constructs the
appropriate type. Same pattern applied to ApplicationDataContainer.

This eliminates 17+ repeated if-checks, removes the shared_ptr indirection
for containers, and makes each type self-contained with no branching.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant