예제 #1
0
 public BlockViewModel(ProtocolBlock block, IEnumerable<KeyItemViewModel> keyItemViewModels)
 {
     _block = block;
     _keyItemViewModels = keyItemViewModels;
     WorkingSize = Size;
     StartPosition = 0;
 }
 private int CalculateParity(ProtocolBlock block)
 {
     return block.KeyItems.Skip(StartPosition).Take(PositionsCount / 2).Count(item => item.Value == 1) % 2;
 }