示例#1
0
        public void Copy(object original, CopyService copyService)
        {
            var org = (TrackableEvent)original;

            // create a copy without handlers
            _changeTracker = copyService.Copy(org._changeTracker);
            _handlers      = new TrackableList <Action>();
            _handlers.Initialize(_changeTracker);
        }
示例#2
0
        public TrackableSet <T> Initialize(INotifyChangeTracker changeTracker, IHashDependancy hashDependancy = null)
        {
            if (hashDependancy != null)
            {
                _hashDependancy = hashDependancy;
            }

            _changeTracker = changeTracker;
            return(this);
        }
示例#3
0
        public void Initialize(INotifyChangeTracker changeTracker)
        {
            foreach (var managroup in _groups)
            {
                managroup.Initialize(changeTracker);
            }

            _manaPool.Initialize(changeTracker);
            _removeList.Initialize(changeTracker);
        }
示例#4
0
        public void Copy(object original, CopyService copyService)
        {
            var org = (Publisher)original;

            _changeTracker      = copyService.Copy(org._changeTracker);
            _eventsCache        = org._eventsCache;
            _subscribersByEvent = new Dictionary <Type, TrackableList <object> >();

            foreach (var subscriber in org._subscribersByEvent)
            {
                var subscribers = subscriber.Value
                                  .Where(x => IsUiComponent(x) == false)
                                  .Select(copyService.Copy);

                var trackableSubscribers = new TrackableList <object>(subscribers);
                trackableSubscribers.Initialize(_changeTracker);
                _subscribersByEvent.Add(subscriber.Key, trackableSubscribers);
            }
        }
示例#5
0
        public void Initialize(INotifyChangeTracker changeTracker)
        {
            foreach (var managroup in _groups)
            {
                managroup.Initialize(changeTracker);
            }

            _manaPool.Initialize(changeTracker);
            _removeList.Initialize(changeTracker);
        }
示例#6
0
        public SimpleAbility Initialize(INotifyChangeTracker changeTracker)
        {
            _isEnabled.Initialize(changeTracker);

            return(this);
        }
示例#7
0
 public virtual void Initialize(INotifyChangeTracker changeTracker)
 {
     Changed.Initialize(changeTracker);
 }
示例#8
0
 public void Initialize(INotifyChangeTracker changeTracker)
 {
     _preventions.Initialize(changeTracker);
 }
示例#9
0
        public SimpleAbility Initialize(INotifyChangeTracker changeTracker)
        {
            _isEnabled.Initialize(changeTracker);

            return this;
        }
示例#10
0
 public override void Initialize(INotifyChangeTracker changeTracker)
 {
     base.Initialize(changeTracker);
     _value.Initialize(changeTracker);
 }
示例#11
0
 public void Initialize(INotifyChangeTracker changeTracker)
 {
     _changeTracker = changeTracker;
     _handlers.Initialize(changeTracker);
 }
示例#12
0
 public TrackableEvent Initialize(INotifyChangeTracker changeTracker)
 {
     _changeTracker = changeTracker;
     _handlers.Initialize(changeTracker);
     return(this);
 }
示例#13
0
 public void Initialize(INotifyChangeTracker changeTracker)
 {
     _preventions.Initialize(changeTracker);
 }
示例#14
0
 public Publisher(Assembly assembly = null, INotifyChangeTracker changeTracker = null, string ns = null)
 {
     assembly       = assembly ?? Assembly.GetExecutingAssembly();
     _eventsCache   = new EventsCache(assembly, ns);
     _changeTracker = changeTracker ?? new ChangeTracker.Guard();
 }