protected static void appendUnitOperatorPair(List <UnitOperatorPair> unitOperatorPairs, IBase item, char newOperator) { IBase unitToAdd = (IBase)item.Clone(); string operatorToAdd = unitOperatorPairs.Count == 0 ? string.Empty : newOperator.ToString(); addUnitOperatorPair(unitToAdd, operatorToAdd, unitOperatorPairs); }
/// <summary> /// Adds the power. /// </summary> /// <param name="power">The power.</param> protected void addPower(IBase power) { if (power != null && !power.IsEmpty()) { _power = (IBase)power.Clone(); } }
public IBase GetPower() { return((IBase)_power.Clone()); }
public UnitOperatorPair(IBase unit, string unitOperator) { Unit = (IBase)unit.Clone(); Operator = unitOperator; }