ReactiveUI向Splat注册多个程序集?

时间:2018-08-23 00:22:36

标签: reactiveui splat

是否可以使用ReactiveUI / Splat注册包含注册模块的多个程序集?

类似:

Locator.CurrentMutable.RegisterAssemblies(typeof(CommonModule).Assembly, typeof(WindowsModule).Assembly));

1 个答案:

答案 0 :(得分:0)

没有内置

两种方法。

您可以使用类似的方法来注册rxui。

它们具有进行注册的界面。有关示例,请参见https://github.com/reactiveui/ReactiveUI/blob/master/src/ReactiveUI.Wpf/Registrations.cs。您只需要自己运行类似于

的func逻辑即可

另外,还有一种自动执行splat的方法,该方法将使用名为RegisterViewsForViewModels的iviewfor注册所有项目,这是splat可变容器的变体。