/// <summary>
 /// Registers the unit.
 /// </summary>
 /// <param name="derivedUnit">
 /// The unit to be registered.
 /// </param>
 public void Register(DerivedUnit derivedUnit)
 {
     var derivedNotation = derivedUnit.Notation;
     this.unitDefinitions.Add(derivedNotation, derivedUnit);
     var expression = derivedUnit.GetBaseExpression();
     var flatRepresentation = this.expressionToFlatRepresentationConverter.Convert(
         expression,
         false,
         new FlatRepresentationBuilder());
     this.derivedUnits.Add(flatRepresentation, derivedUnit);
 }
        /// <summary>
        /// Unregisters the unit.
        /// </summary>
        /// <param name="derivedUnit">
        /// The unit to be unregistered.
        /// </param>
        public void Unregister(DerivedUnit derivedUnit)
        {
            this.unitDefinitions.Remove(derivedUnit.Notation);

            var baseExpression = derivedUnit.GetBaseExpression();
            var flatRepresentation = this.expressionToFlatRepresentationConverter.Convert(
                baseExpression,
                false,
                new FlatRepresentationBuilder());
            this.derivedUnits.Remove(flatRepresentation);
        }