public TViewFeatureViewModel(Feature feature, ElementViewModel parent) { this.feature = feature; this.Parent = parent; this.Name = feature.ToString(); this.Children = null; }
//--------------------------------------------------------------------- public TViewVersionViewModel(Version version, ElementViewModel parent) { this.version = version; this.Parent = parent; this.Name = version.ToString(); this.Children = new ReadOnlyCollection<ElementViewModel>((from feature in this.version.Features select new TViewFeatureViewModel(feature, this)).ToList<ElementViewModel>()).ToList(); }
//--------------------------------------------------------------------- public TViewProductViewModel(Product product, ElementViewModel parent = null) { this.Parent = parent; this.Product = product; this.Name = product.ToString(); this.Children = new ReadOnlyCollection<ElementViewModel>((from version in this.Product.Versions select new TViewVersionViewModel(version, this)).ToList<ElementViewModel>()).ToList(); }
//--------------------------------------------------------------------- public TViewProductGroupViewModel(ProductGroup productGroup, ElementViewModel parent = null) { this.Group = productGroup; this.Parent = parent; this.Name = this.Group.ToString(); this.Children = new ReadOnlyCollection<ElementViewModel>((from product in this.Group.Products select new TViewProductViewModel(product,this)).ToList<ElementViewModel>()).ToList(); }