Exemple #1
0
        public FilteredConnectablesGroup Add(ITECScope child)
        {
            FilteredConnectablesGroup newGroup = new FilteredConnectablesGroup(child, this.filter);

            this.Add(newGroup);
            return(newGroup);
        }
Exemple #2
0
 public void Add(FilteredConnectablesGroup child)
 {
     foreach (var pair in child.scopeDictionary)
     {
         this.scopeDictionary.Add(pair.Key, pair.Value);
     }
     child.scopeDictionary  = this.scopeDictionary;
     child.PropertyChanged += childPropertyChanged;
     this.ChildrenGroups.Add(child);
     this.PassesFilter = thisPassesFilter();
 }
Exemple #3
0
        public bool Remove(ITECScope child)
        {
            FilteredConnectablesGroup groupToRemove = scopeDictionary.ContainsKey(child) ? scopeDictionary[child] : null;

            if (groupToRemove == null)
            {
                return(false);
            }
            else
            {
                this.Remove(groupToRemove);
                return(true);
            }
        }
Exemple #4
0
        public bool Remove(FilteredConnectablesGroup child)
        {
            var moreChildren = new List <FilteredConnectablesGroup>(child.ChildrenGroups);

            foreach (var childGroup in moreChildren)
            {
                child.Remove(childGroup);
            }
            child.scopeDictionary = null;
            this.scopeDictionary.Remove(child.Scope);
            child.PropertyChanged -= childPropertyChanged;
            if (this.ChildrenGroups.Remove(child))
            {
                this.PassesFilter = thisPassesFilter();
                return(true);
            }
            else
            {
                return(false);
            }
        }