Example #1
0
 public void AddWeightCalculationEntity(RectificationEntity entity)
 {
     if (WeightCalculationEntityDuplicates(entity))
     {
         return;
     }
     _entitiesForWeightCalculation.Add(entity);
 }
        public void AddUnitFromRectificationEntity(RectificationEntity rectificationEntity)
        {
            var nameWithoutTrailingNumbers = TrimTrailingNumbers(rectificationEntity.Name);

            if (!UnitWithThisNameExists(nameWithoutTrailingNumbers))
            {
                CreateNewUnit(nameWithoutTrailingNumbers);
            }
            this[nameWithoutTrailingNumbers].AddWeightCalculationEntity(rectificationEntity);
            this[nameWithoutTrailingNumbers].AddToWeightToBeUpdatedList(rectificationEntity);
        }
Example #3
0
 private bool WeightCalculationEntityDuplicates(RectificationEntity pair)
 {
     return(_entitiesForWeightCalculation.Any(ele => ele.Name == pair.Name));
 }
Example #4
0
 public void AddToWeightToBeUpdatedList(RectificationEntity entity)
 {
     _entitiesWhoseWeightWillBeUpdated.Add(entity);
 }