Closed workgroupengineering closed 3 months ago
The general idea of our type system abstraction is to mirror SRE APIs, since those are the most convenient to use. So 2+3 would make the most sense.
Do I add 2+3 to IXamlMethod
or create IXamlGenericMethod
?
I would say, adding these to IXamlMethod.
HI, in the pr https://github.com/AvaloniaUI/Avalonia/pull/15274. I have need to retrieve
Interactive.AddHandler<TEventArgs>
method. To do this, I tried usingIXamlType.FindMethod
and checking if the method name is AddHandler`1 without success.After investigation I found following workaround
https://github.com/AvaloniaUI/Avalonia/blob/3f82e64c469198d3e80557b7c3c5071a8c29d806/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs#L155-L163
I would like to make a PR that makes it easier to identify the generic method. There are a few possibilities:
IsGenericDef
to IXamlMethodWhat do you think is the best solution?