コード例 #1
0
 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();
 }
コード例 #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();
 }