Example #1
0
        public void IntersectWith(ObservableHashSet <T> other)
        {
            if (other == null)
            {
                throw new ArgumentNullException("other");
            }

            foreach (var key in _store.Keys)
            {
                if (!other.Contains(key))
                {
                    _store.Remove(key);
                }
            }
        }
Example #2
0
        public bool IsSubsetOf(ObservableHashSet <T> other)
        {
            if (other == null)
            {
                throw new ArgumentNullException("other");
            }

            foreach (var item in _store.Keys)
            {
                if (!other.Contains(item))
                {
                    return(false);
                }
            }

            return(true);
        }