private void removeChildFromScope(TECScope scope, TECObject child) { if (child is TECAssociatedCost cost) { scope.AssociatedCosts.Remove(cost); } else if (child is TECTag tag) { scope.Tags.Remove(tag); } else { throw new NotImplementedException("Scope child isn't cost or tag."); } }
protected void copyPropertiesFromScope(TECScope scope) { base.copyPropertiesFromTagged(scope); AssociatedCosts.ObservablyClear(); scope.AssociatedCosts.ForEach(item => this.AssociatedCosts.Add(item)); }