コード例 #1
0
 public INotifyCollection <T> AsNotifiable()
 {
     if (proxy == null)
     {
         proxy = this.WithUpdates();
     }
     return(proxy);
 }
コード例 #2
0
        public KeyedWrapNotifyCollection(INotifyCollection <TInner> collection, IEqualityComparer <TKey> comparer, IAnkhServiceProvider context)
            : base(new WrapInnerCollection(collection, comparer))
        {
            _context         = context;
            _inner           = (WrapInnerKeyedCollection)base.Items;
            _inner.Converter = this;

            OnPreInitialize(context);
            _inner.ResetCollection();
        }
コード例 #3
0
        public WrapNotifyCollection(INotifyCollection <TInner> collection, object context)
            : base(new WrapInnerCollection(collection))
        {
            _context = context;

            _inner           = (WrapInnerCollection)this.Items;
            _inner.Converter = this;

            OnPreInitialize(context);
            _inner.ResetCollection();
        }
コード例 #4
0
            public WrapInnerCollection(INotifyCollection <TInner> collection)
            {
                if (collection == null)
                {
                    throw new ArgumentNullException("collection");
                }

                _sourceCollection = collection;
                _sourceCollection.CollectionChanged += OnSourceCollectionChanged;
                _sourceCollection.PropertyChanged   += OnSourcePropertyChanged;
                _sourceCollection.Disposed          += OnSourceCollectionDisposed;
            }
コード例 #5
0
            public override INotifyCollection <TInner> GetWrappedCollection()
            {
                if (_roInner == null)
                {
                    _roInner = _sourceCollection as ReadOnlyKeyedNotifyCollection <TKey, TInner>;

                    if (_roInner == null)
                    {
                        KeyedNotifyCollection <TKey, TInner> rwInner = _sourceCollection as KeyedNotifyCollection <TKey, TInner>;

                        if (rwInner != null)
                        {
                            _roInner = new ReadOnlyKeyedNotifyCollection <TKey, TInner>(rwInner);
                        }
                        else
                        {
                            _roInner = base.GetWrappedCollection();
                        }
                    }
                }
                return(_roInner);
            }
コード例 #6
0
ファイル: ObservableOfType.cs プロジェクト: LennartH/NMF
 public ObservableOfTypeCollection(INotifyCollection <TSource> source)
     : base(source)
 {
 }
コード例 #7
0
 public static INotifyCollection <T> WhereCollection <T>(INotifyCollection <T> source, ObservingFunc <T, bool> filter)
 {
     return(new ObservableWhere <T>(source, filter));
 }
コード例 #8
0
 internal ReadOnlyObservableWrapper(INotifyCollection <T> collection)
     : base(collection)
 {
 }
コード例 #9
0
 public KeyedWrapNotifyCollection(INotifyCollection <TInner> collection, IEqualityComparer <TKey> comparer)
     : this(collection, comparer, (IAnkhServiceProvider)null)
 {
 }
コード例 #10
0
 protected WrapNotifyCollection(INotifyCollection <TInner> collection)
     : this(collection, null)
 {
 }
コード例 #11
0
 public ReadOnlyNotifyCollection(INotifyCollection <T> collection)
     : base(collection)
 {
     _innerCollection = (INotifyCollection <T>)base.Items;
 }