private TransformationViewModel(Transformation person, TransformationViewModel parent) { _transformation = person; _parent = parent; _children = new ReadOnlyCollection <TransformationViewModel>( (from child in _transformation.Children select new TransformationViewModel(child, this)) .ToList <TransformationViewModel>()); }
public LookUpViewModel(Transformation rootTransformation) { try { _plugins = LookAtUtil.LoadPlugins(); } catch (Exception) { // TODO: add warning here } _root = new TransformationViewModel(rootTransformation); _firstGeneration = new ReadOnlyCollection <TransformationViewModel>( new TransformationViewModel[] { _root }); _searchCommand = new SearchTransformationTreeCommand(this); }