Пример #1
0
 private void AddCharacteristicsToComponent(List <ComponentCharacteristic> characteristics, PCComponent newComponent)
 {
     for (var j = 0; j < 3; j++)
     {
         var characteristic = characteristics.RandomElementExcept(newComponent.Characteristics.Keys.ToList());
         var value          = _characteristicHandlers.First(x => x.CharacteristicType.IsInstanceOfType(characteristic))
                              .CreateRandomValue(characteristic);
         newComponent.WithCharacteristicValue(value);
     }
 }