public ViewModel Create(string name) { var type = _assembly.GetType(name); var instance = Activator.CreateInstance(type); var vm = new ViewModel(instance); _viewModels[vm.GetHashCode().ToString()] = vm; return vm; }
public void Add(ViewModel vm) { _viewModels[vm.GetHashCode().ToString()] = vm; }