-
Notifications
You must be signed in to change notification settings - Fork 121
Project classes implementing generics and Project arrays #2096
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
Conversation
manodasanW
commented
Oct 28, 2025
- Added support for projecting classes implementing generics
- Added support for projecting arrays
- Ported all the additions to the new format.
- To avoid having them as all manual projections, I added support for partial additions which basically cswinrt will generate the type with partial and we will add the addition as another partial type. This is mostly for types which just had a custom ToString that they wanted to add.
- Enabled all the projections and address issues encountered.
- Moved most event sources to respective ABI namespace to avoid hard coding in cswinrt.exe
Sergio0694
left a comment
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.
Did a first partial pass, left some notes for now 🙂
src/Projections/Windows.UI.Xaml/ABI.Windows.System/DispatcherQueueProxyHandler.cs
Outdated
Show resolved
Hide resolved
src/cswinrt/strings/additions/Windows.Storage.Streams/WellKnownStreamInterfaceIIDs.cs
Outdated
Show resolved
Hide resolved
src/WinRT.Runtime2/InteropServices/ProjectionDllExports/TokenizerHelper.cs
Show resolved
Hide resolved
...osoft.UI.Xaml.Controls.Primitives/Microsoft.UI.Xaml.Controls.Primitives.GeneratorPosition.cs
Outdated
Show resolved
Hide resolved
...itions/Microsoft.UI.Xaml.Media.Animation/Microsoft.UI.Xaml.Media.Animation.RepeatBehavior.cs
Outdated
Show resolved
Hide resolved
|
|
||
| case RepeatBehaviorType.Count: | ||
|
|
||
| global::System.Text.StringBuilder sb = new global::System.Text.StringBuilder(); |
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.
Also we should set SkipLocalsInit for all projection .dlls if we don't already. At least the merged .dll, as we own it.
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.
Will handler later once we have merged dll
...trings/additions/Microsoft.UI.Xaml.Media.Media3D/Microsoft.UI.Xaml.Media.Media3D.Matrix3D.cs
Outdated
Show resolved
Hide resolved
| // the transform is identity by default | ||
| private static Matrix s_identity = CreateIdentity(); | ||
|
|
||
| public static Matrix Identity |
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.
@tannergooding is there something smart we could do here like creating a BCL matrix and reinterpreting it or something, rather than storing this value in a static field like this?
...trings/additions/Microsoft.UI.Xaml.Media.Media3D/Microsoft.UI.Xaml.Media.Media3D.Matrix3D.cs
Outdated
Show resolved
Hide resolved
src/cswinrt/strings/additions/Microsoft.UI.Xaml.Media/Microsoft.UI.Xaml.Media.Matrix.cs
Show resolved
Hide resolved
1a2c76d to
e185e84
Compare
Sergio0694
left a comment
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.
Checked the projection .dll too, looks great!! 🎉
| /// </summary> | ||
| /// <param name="exception">The input <see cref="Exception"/> instance to attach the error info to.</param> | ||
| /// <returns>The input <see cref="Exception"/> instance with attached error info.</returns> | ||
| public static Exception AttachErrorInfo(Exception exception) |
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.
Is this only meant to be used by projections? I'm thinking if so we might want to mark this one and the other ones in RestrictedErrorInfo that are not for general use as private implementation detail methods (or move them).
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.
Will address in upcoming PR.