public EventTreeCollection(IEventTreeCollection remoteObject)
     : base(remoteObject)
 {
     _dictionaryByUid             = new Dictionary <ulong, ISingleEventTree>();
     _collectionUpdatedEvent      = new SafeEventHandlerCollection <EventTreeEventArgs>();
     _collectionUpdatedSubscriber = new RemoteEventSubscription <EventTreeEventArgs>(remoteObject, "CollectionUpdated", OnRemoteCollectionUpdated);
     _collection = new ObservableCollection <ISingleEventTree>();
     _collection.CollectionChanged += OnCollectionChanged;
     InitializeCollection();
 }
Ejemplo n.º 2
0
 protected UnitCollectionProxyBase(IUnitCollection <T> remoteObject)
     : base(remoteObject)
 {
     _lock                          = new object();
     _collection                    = new ObservableCollection <T>();
     _dictionaryByUid               = new Dictionary <ulong, T>();
     _dictionaryById                = new Dictionary <ulong, List <T> >();
     _unitsUpdatedSubscriber        = new RemoteEventSubscription <UnitCollectionEventArgs <T> >(remoteObject, "UnitsUpdated", OnUnitServerCollectionUpdated);
     _unitsUpdatedEvent             = new SafeEventHandlerCollection <UnitCollectionEventArgs <T> >();
     _collection.CollectionChanged += OnCollectionChanged;
     InitializeCollection();
 }
 protected UnitCollectionBase()
 {
     _dictionaryByUid = new Dictionary <ulong, TUnit>();
     _dictionaryById  = new Dictionary <ulong, List <TUnit> >();
     _unitsUpdated    = new SafeEventHandlerCollection <UnitCollectionEventArgs <TUnit> >();
 }
 protected DaemonUnitCollection()
 {
     _dictionaryByUid = new Dictionary <uint, T>();
     _dictionaryById  = new Dictionary <ulong, List <T> >();
     _unitsUpdated    = new SafeEventHandlerCollection <DaemonUnitCollectionEventArgs <T> >();
 }