StockSharp.BusinessEntities by StockSharp LP https://stocksharp.com

<PackageReference Include="StockSharp.BusinessEntities" Version="5.0.18" />

 UnitHelper2

public static class UnitHelper2
Extension class for Unit.
public static Unit Convert(this Unit unit, UnitTypes destinationType, Security security)

Cast the value to another type.

public static Unit Pips(this int value, Security security)

To create from Int32 the pips values.

public static Unit Pips(this double value, Security security)

To create from Double the pips values.

public static Unit Pips(this decimal value, Security security)

To create from Decimal the pips values.

public static Unit Points(this int value, Security security)

To create from Int32 the points values.

public static Unit Points(this double value, Security security)

To create from Double the points values.

public static Unit Points(this decimal value, Security security)

To create from Decimal the points values.

public static Unit SetSecurity(this Unit unit, Security security)

To set the GetTypeValue property for the value.

public static Unit ToUnit2(this string str, bool throwIfNull = true, Security security = null)

Convert string to Unit.