public void SetMainView(Type viewModelType, object param, Action <ViewModelBase> viewModelInitialization) { if (!typeof(ViewModelBase).IsAssignableFrom(viewModelType)) { throw new ArgumentException($"{viewModelType.Name} must be inherited from the {nameof(ViewModelBase)}"); } ReflectionHelper.CallByReflectionFrom( this, nameof(SetMainViewPrivate), new [] { viewModelType, param?.GetType() ?? typeof(object) }, param, viewModelInitialization); }
public void InsertBefore <TResult>( ViewModelBase beforeViewModel, Type viewModelType, object param, Action <ViewModelBase> viewModelInitialization, CallbackParam <TResult> callbackParam) { if (!typeof(ViewModelBase).IsAssignableFrom(viewModelType)) { throw new ArgumentException($"{viewModelType.Name} must be inherited from the {nameof(ViewModelBase)}"); } ReflectionHelper.CallByReflectionFrom( this, nameof(InsertBeforePrivate), new[] { viewModelType, param?.GetType() ?? typeof(object), typeof(TResult) }, beforeViewModel, param, viewModelInitialization, callbackParam); }