public static SolutionItemViewModel Create(ISolutionParentViewModel parent, ISolutionItem item) { SolutionItemViewModel result = null; if (item is ISolutionFolder folder) { result = new SolutionFolderViewModel(parent, folder); } else if (item is IProject project) { result = new StandardProjectViewModel(parent, project); } else { throw new Exception("Unrecognised model type"); } return(result); }
public static ProjectViewModel Create(SolutionViewModel solutionViewModel, IProject model) { ProjectViewModel result = new StandardProjectViewModel(solutionViewModel, model); return(result); }