/// <summary>
        /// Handler called every time a block state is changed in the controller.
        /// </summary>
        /// <param name="operation">Details of the operation performed.</param>
        private protected virtual void OnBlockStateChanged(IWriteableChangeBlockOperation operation)
        {
            Debug.Assert(operation != null);

            IWriteableBlockState BlockState = operation.BlockState;

            Debug.Assert(BlockState != null);
            Debug.Assert(BlockStateViewTable.ContainsKey(BlockState));
        }
예제 #2
0
        /// <summary>
        /// Changes the replication state of a block.
        /// </summary>
        /// <param name="operation">Details of the operation performed.</param>
        public virtual void ChangeReplication(IWriteableChangeBlockOperation operation)
        {
            ReplicationStatus Replication = operation.Replication;
            int BlockIndex = operation.BlockIndex;

            Debug.Assert(BlockIndex >= 0 && BlockIndex < BlockStateList.Count);

            IWriteableBlockState BlockState = BlockStateList[BlockIndex];

            NodeTreeHelperBlockList.SetReplication(BlockState.ChildBlock, Replication);

            operation.Update(BlockState);
        }