win32 icon indicating copy to clipboard operation
win32 copied to clipboard

Resolve naming conflicts in the `FileOpenPicker` class

Open halildurmus opened this issue 3 years ago • 1 comments

IFileOpenPicker's pickSingleFileAsync() conflicts with IFileOpenPickerWithOperationId's pickSingleFileAsync(string pickerOperationId).

halildurmus avatar Jun 02 '22 15:06 halildurmus

Ugh -- they're supposed to provide a Windows.Foundation.Metadata.OverloadAttribute for this reason (languages that don't include method overloading in their design). I wonder if this is an outlier? We may have to manually provide a list of overrides like this, or build some heuristic.

timsneath avatar Jun 02 '22 15:06 timsneath

I found another naming conflict in the DecimalFormatter class. DecimalFormatter inherits from INumberFormatter and INumberFormatter2 interfaces.

INumberFormatter has overloaded Format methods to format several data types whereas INumberFormatter2 has distinct format methods to format several data types:

Since the functionality provided by these methods is the same, we can exclude the INumberFormatter2 interface in the generator.

As for the conflict in the FileOpenPicker class, the documentation of pickSingleFileAsync(string pickerOperationId) says:

pickerOperationId String This argument is ignored and has no effect.

Because of that, I think we should also exclude the IFileOperationWithOperationId interface.

I created #555 for this. WDYT?

halildurmus avatar Sep 04 '22 12:09 halildurmus