Exemple #1
0
 public CssPageRuleCollection(CssPageRuleCollection other)
 {
     ArgChecker.AssertArgNotNull(other, nameof(other));
     foreach (var item in other._items)
     {
         _items.Add(item.Key, new CssNestedBlockCollection(item.Value));
     }
 }
Exemple #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);
            }
        }