DarthMazut / MochaLibrary

Just another MVVM library which gives you some abstract classes out-of-the-box.
0 stars 0 forks source link

Refactor `Navigator.CreateProxy()` method #28

Open DarthMazut opened 2 months ago

DarthMazut commented 2 months ago

Currently if you'd like to create IRemoteNavigator you'd use Navigator.CreateProxy() and pass service id. This originates from the idea that either INavigator or IRemoteNavigator are created using factory methods, to unify creation process. Now this soultion has a major drawback:

The proposed solution is as follows: public INavigator Navigator { get; } = new Navigator(); and for IRemoteNavigator: _ = NavigationServices.MainNavigationService.CreateProxy(this); instead of current _ = Navigator.CreateProxy(NavigationServices.MainNavigationServiceId, this);