Esempio n. 1
0
        public CssNestedBlockCollection(CssNestedBlockCollection other)
        {
            ArgChecker.AssertArgNotNull(other, nameof(other));

            _defaultKey = other._defaultKey;
            foreach (var item in other._items)
            {
                _items.Add(item.Key, new CssBlockCollection(item.Value));
            }
        }
Esempio n. 2
0
        internal void MergeWith(CssPageRuleCollection other)
        {
            foreach (var otherItem in other._items)
            {
                CssNestedBlockCollection item;
                if (!_items.TryGetValue(otherItem.Key, out item))
                {
                    item = new CssNestedBlockCollection(otherItem.Value);
                    _items.Add(otherItem.Key, item);
                    return;
                }

                item.MergeWith(otherItem.Value);
            }
        }