Пример #1
0
 internal void SetComparer(DomNameComparer comparer)
 {
     _items = _items.SetComparer(
         comparer, attr => {
         attr.Unlink();
         NotifyAttributeChanged(attr, attr.Value);
     }
         );
 }
        internal DomAttributeCollectionImpl SetComparer(DomNameComparer comparer, Action <DomAttribute> onRejected)
        {
            if (_comparer == comparer)
            {
                return(this);
            }

            var newItems = _items.DistinctWithEvents(
                DomNameComparer.AttributeAdapter(comparer), onRejected
                );

            return(new DomAttributeCollectionImpl(newItems, comparer));
        }
Пример #3
0
 public Impl(string namePattern, string namespaceUriPattern, DomNameComparer comparer)
 {
     _namePattern         = new Regex($@"\A{namePattern}\Z");
     _namespaceUriPattern = new Regex($@"\A{namespaceUriPattern}\Z");
     _comparer            = comparer;
 }