public void AddGoodCanditate(INumberUnit goodUnitCandidate)
        {
            if (this.goodCandidates.Any(g => g.Equals(goodUnitCandidate)))
            {
                return;
            }

            this.goodCandidates.Add(goodUnitCandidate);
        }
示例#2
0
 private void AddUnit(INumberUnit unit)
 {
     this.units.Add(unit);
 }
        public void IncludeAlways(INumberUnit unitToInclude)
        {
            if (this.unitsToInclude.Any(u => u.Equals(unitToInclude)))
            {
                return;
            }

            this.unitsToInclude.Add(unitToInclude);
        }
        public void RemoveGoodCanditate(INumberUnit goodUnitCandidate)
        {
            var goodCandidateToRemove = this.goodCandidates.FirstOrDefault(b => b.Equals(goodUnitCandidate));

            if (goodCandidateToRemove == null)
            {
                return;
            }

            this.goodCandidates.Remove(goodCandidateToRemove);
        }