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 generic WinRT interfaces #64

Merged
merged 1 commit into from
Feb 11, 2023
Merged

Refactor generic WinRT interfaces #64

merged 1 commit into from
Feb 11, 2023

Conversation

halildurmus
Copy link
Owner

@halildurmus halildurmus commented Feb 11, 2023

Description

  • IAsyncOperation, IIterator, IKeyValuePair, IMap, IMapView, IVector, and IVectorView classes are now abstract
  • Adds private subclasses for the supported type arguments of the above classes (e.g. _IAsyncOperationBool class for IAsyncOperation<bool> types).
  • Adds WinRTIntType enum (replaces Type parameters on the above classes)

With these changes, performance should be improved as type checks are only performed once in factory constructors instead of when each instance method is called, and also the code is cleaner now.

We should definitely explore whether we can automate the generation of these private subclasses in the future, as they are very time-consuming and error-prone to manage at the moment.

Related Issue

None

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@halildurmus halildurmus added the type: refactor Refactor an existing implementation label Feb 11, 2023
@github-actions github-actions bot added pkg: windows_devices The windows_devices package pkg: windows_foundation The windows_foundation package pkg: windows_graphics The windows_graphics package pkg: winrtgen The winrtgen package labels Feb 11, 2023
@halildurmus halildurmus merged commit ad551dc into main Feb 11, 2023
@halildurmus halildurmus deleted the refactor branch February 11, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: windows_devices The windows_devices package pkg: windows_foundation The windows_foundation package pkg: windows_graphics The windows_graphics package pkg: winrtgen The winrtgen package type: refactor Refactor an existing implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant