CsWinRT
CsWinRT copied to clipboard
Remove generated 'As<I>()' methods for static types
This PR removes the generated As<I>() methods on static RCW types. This method is:
- Unnecessary, now that
ActivationFactoryis public - Only works with either
[ComImport]types, or via IDIC - It doesn't exist on non-static RCW types, which is not consistent (eg. Win2D uses that)
Devs should just use ActivationFactory directly, which also exposes new high perf methods.
Isn't it an ABI breaking change? I don't think it's acceptable though as all existing apps including WinRT component libraries will stop working.
Maybe you can put this under yet another feature flag to make it an opt-in feature. Keeping the As<I>() is also good for developer experience (string cannot be replaced automatically when doing refactor on namespace/type names).
Closing this too, moving to 3.0.