Ejemplo n.º 1
0
 public void Load(IClusterIO io)
 {
     for (int i = 0; i < _clusterAddresses.Count; i++)
     {
         ArrayCluster <T> c = _clusterFactory(_clusterAddresses[i]);
         io.Load(c);
         for (int j = 0; j < _elementsPerCluster; j++)
         {
             int index = i * _elementsPerCluster + j;
             _elements[index] = c[j];
         }
         _isModified[i] = false;
     }
 }
Ejemplo n.º 2
0
        public void Load(IClusterIO io)
        {
            for (int i = 0; i < _clusterAddresses.Count; i++)
            {
                ArrayCluster <T> c = _clusterFactory(_clusterAddresses[i]);
                io.Load(c);
                for (int j = 0; j < _elementsPerCluster; j++)
                {
                    int index = i * _elementsPerCluster + j;

                    if (_elements[index] != null)
                    {
                        _elements[index].Changed -= _notifyChangedDelegates[i];
                    }
                    _elements[index] = c[j];
                    if (_elements[index] != null)
                    {
                        _elements[index].Changed += _notifyChangedDelegates[i];
                    }
                }
                _isModified[i] = false;
            }
        }