Beispiel #1
0
        public WrapperCollection(WeakObservableCollection <T> src)
        {
            _coll    = src;
            _updater = new EventReceiver <NotifyCollectionChangedEventArgs>(
                coll_CollectionChanged);

            _propertyUpdater = new EventReceiver <PropertyChangedEventArgs>(
                coll_PropertyChanged);

            _coll.ContentChanged.AddReceiver(_updater);
            _coll.PropertyValueChanged.AddReceiver(_propertyUpdater);
        }
Beispiel #2
0
 public static AutoCollection <T> ToAutoProcessed <T>(this WeakObservableCollection <T> source)
     where T : class
 {
     return(source.ToReadOnly().ToAutoProcessed());
 }
Beispiel #3
0
 /// <summary>
 /// обертывает исходную коллекцию в оболочку, реализующую интерфейс IReadOnlyCollection
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="sourceCollection"></param>
 /// <returns></returns>
 public static IReadOnlyCollection <T> ToReadOnly <T>(this WeakObservableCollection <T> sourceCollection)
 {
     return(new WrapperCollection <T>(sourceCollection));
 }
Beispiel #4
0
 private ProtectedCollection(WeakObservableCollection <T> myColl)
     : base(myColl)
 {
     _myColl = myColl;
 }