/// <summary> /// Gets the units of the specified type. /// </summary> /// <typeparam name="T"> /// The type of units to get. /// </typeparam> /// <param name="unitProvider"> /// The unit provider. /// </param> /// <returns> /// A dictionary of units. /// </returns> public static Dictionary <string, IQuantity> GetUnits <T>(this IUnitProvider unitProvider) where T : IQuantity <T> { return(unitProvider.GetUnits(typeof(T))); }