internal void ApplyCommands(IEnumerable<Command> cmds)
{
foreach (Command command in cmds)
{
switch (command.Type)
{
case CommandType.Put:
AddInteral(command.Key, new PositionInFile
{
Position = command.Position,
Size = command.Size
});
break;
case CommandType.Delete:
RemoveInternal(command.Key);
break;
default:
throw new ArgumentOutOfRangeException();
}
}
}