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:
At INavigationParticipant implementation the INavigator creation looks typically as follows:
public INavigator Navigator { get; } = MochaCore.Navigation.Navigator.Create();
that is much boilerplate and it cannot be ommited because Navigator type collides with Navigator property.
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);
Currently if you'd like to create
IRemoteNavigator
you'd useNavigator.CreateProxy()
and pass service id. This originates from the idea that eitherINavigator
orIRemoteNavigator
are created using factory methods, to unify creation process. Now this soultion has a major drawback:INavigationParticipant
implementation theINavigator
creation looks typically as follows:public INavigator Navigator { get; } = MochaCore.Navigation.Navigator.Create();
that is much boilerplate and it cannot be ommited becauseNavigator
type collides withNavigator
property.The proposed solution is as follows:
public INavigator Navigator { get; } = new Navigator();
and forIRemoteNavigator
:_ = NavigationServices.MainNavigationService.CreateProxy(this);
instead of current_ = Navigator.CreateProxy(NavigationServices.MainNavigationServiceId, this);