public async Task CloseToRootAsync( Type viewModelType, object param, Action <ViewModelBase> viewModelInitialization, bool withAnimation = true) { if (!typeof(ViewModelBase).IsAssignableFrom(viewModelType)) { throw new ArgumentException($"{viewModelType.Name} must be inherited from the {nameof(ViewModelBase)}"); } await ReflectionHelper.CallByReflectionFromAsync( this, nameof(CloseToRootPrivateAsync), new[] { viewModelType, param?.GetType() ?? typeof(object) }, param, viewModelInitialization, withAnimation); }
public async Task NavigateToAsync <TResult>( Type viewModelType, object param, Action <ViewModelBase> viewModelInitialization, CallbackParam <TResult> callbackParam, Action <NavigationConfigBuilder> config = null) { if (!typeof(ViewModelBase).IsAssignableFrom(viewModelType)) { throw new ArgumentException($"{viewModelType.Name} must be inherited from the {nameof(ViewModelBase)}"); } await ReflectionHelper.CallByReflectionFromAsync( this, nameof(NavigateToPrivateAsync), new [] { viewModelType, param?.GetType() ?? typeof(object), typeof(TResult) }, param, viewModelInitialization, callbackParam, config); }