If my model has implemented an interface such as IDisposable the interface should be implemented on the generated Bindable Model.
public partial record MainModel : IDisposable
{
void IDisposable.Dispose()
{
// dispose some resources
}
}
public partial class BindableMainModel : IDisposable
{
void IDisposable.Dispose()
{
((IDisposable)Model).Dispose();
}
}
Note that any interfaces would most likely need to be explicitly implemented as shown otherwise the Reactive Generator would currently assume that it is a Command that needs to be implemented. This should also support properties and events on interfaces not just methods.
Why is this needed:
This would allow the MVUX pattern to be used beyond just Uno.Extensions.Navigation as it would open it up to other frameworks where you might want or need to use interfaces for things such as Navigation.
What would you like to be added:
If my model has implemented an interface such as
IDisposable
the interface should be implemented on the generated Bindable Model.Note that any interfaces would most likely need to be explicitly implemented as shown otherwise the Reactive Generator would currently assume that it is a Command that needs to be implemented. This should also support properties and events on interfaces not just methods.
Why is this needed:
This would allow the MVUX pattern to be used beyond just Uno.Extensions.Navigation as it would open it up to other frameworks where you might want or need to use interfaces for things such as Navigation.