Ejemplo n.º 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);
        }
Ejemplo n.º 2
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);
            }
        }
Ejemplo n.º 3
0
 public void Copy(object original, CopyService copyService)
 {
     Seed    = (int)DateTime.Now.Ticks;
     _random = new Random(Seed);
 }
Ejemplo n.º 4
0
        public void Copy(object original, CopyService copyService)
        {
            var org = (ChangeTracker)original;

            _isEnabled = org._isEnabled;
        }