Class UnitHelper
- Namespace
- StockSharp.Messages
- Assembly
- StockSharp.Messages.dll
Extension class for Unit.
public static class UnitHelper
- Inheritance
-
UnitHelper
- Inherited Members
Methods
Percents(decimal)
Convert the decimal to percents.
public static Unit Percents(this decimal value)
Parameters
Returns
- Unit
Percents.
Percents(double)
Convert the double to percents.
public static Unit Percents(this double value)
Parameters
Returns
- Unit
Percents.
Percents(int)
Convert the int to percents.
public static Unit Percents(this int value)
Parameters
Returns
- Unit
Percents.
Times(Unit, int)
Multiple Value on the specified times.
public static Unit Times(this Unit unit, int times)
Parameters
Returns
- Unit
Result.
ToUnit(string, bool, Func<UnitTypes, decimal?>)
Convert string to Unit.
public static Unit ToUnit(this string str, bool throwIfNull = true, Func<UnitTypes, decimal?> getTypeValue = null)
Parameters
str
stringString value of Unit.
throwIfNull
boolThrow ArgumentNullException if the specified string is empty.
getTypeValue
Func<UnitTypes, decimal?>The handler returns a value associated with Type (price or volume steps).