CsWinRT
CsWinRT copied to clipboard
Handle Versioned / Overloaded functions
Description
If a WinRT class has a versioned / overloaded function, generating the projections results in error CS0540. The projection should be able to properly handle this scenario.
Sample input: runtimeclass MyClass { [contract(MyClassContract, 1.0)] { void ReportResult(UInt32 itemIndex, Boolean isAccurate); } [contract(MyClassContract, 1.1)] { void ReportResult(UInt32 itemIndex, Int32 isAccurate); } }
Sample output: error CS0540 'MyClass.IMyClass2.ReportResult(uint, Int32)': containing type does not implement interface 'IMyClass2'
@manodasanW was able to provide workaround but filing bug for future.
Steps To Reproduce
- Write an idl with overloaded functions that are versioned.
- Use CsWinRT to generate the projections
- Warning will be visible in the output with error CS0540
Expected Behavior
No warning should be provided after building the projections.
Version Info
CsWinRT version: 2.2.0
Additional Context
No response