public Type GetViewModelType() { string key = $"{AssemblyName},{ViewModelTypeName}"; if (KnownWidgetModel.ContainsKey(key)) { return(KnownWidgetModel[key]); } return(null); }
public WidgetBase CreateViewModelInstance(IServiceProvider serviceProvider) { string key = $"{AssemblyName},{ViewModelTypeName}"; if (_widgetBase == null && KnownWidgetModel.ContainsKey(key)) { _widgetBase = serviceProvider.GetService(KnownWidgetModel[key]) as WidgetBase; } return(CopyTo(_widgetBase)); }