C# Class Revit.SDK.Samples.SharedCoordinateSystem.CS.UnitConversion

a class used to deal with converting operation
Mostrar archivo Open project: AMEE/revit

Public Methods

Method Description
ConvertFrom ( CityInfo cityInfo ) : CityInfoString

convert CityInfo into CityInfoString

ConvertTo ( CityInfoString cityInfoString ) : CityInfo

convert CityInfoString into CityInfo

DealDecimalNumber ( string value, int number ) : string

deal with decimal number

DealPrecision ( double value, int precision ) : double

deal with value according to precision

DoubleToString ( double value, ValueType valueType ) : string

convert double into string

StringToDouble ( string value, ValueType valueType, double &newValue ) : bool

convert string into double

Private Methods

Method Description
ParseFromString ( string value, ValueType valueType, double &result ) : bool

Parse double from string

ValueConversion ( double value, ValueType valueType, bool isDoubleToString, double &newValue ) : void

deal with ratio

Method Details

ConvertFrom() public static method

convert CityInfo into CityInfoString
public static ConvertFrom ( CityInfo cityInfo ) : CityInfoString
cityInfo CityInfo CityInfo need to convert
return CityInfoString

ConvertTo() public static method

convert CityInfoString into CityInfo
public static ConvertTo ( CityInfoString cityInfoString ) : CityInfo
cityInfoString CityInfoString CityInfoString need to convert
return CityInfo

DealDecimalNumber() public static method

deal with decimal number
public static DealDecimalNumber ( string value, int number ) : string
value string string wanted to deal with
number int number of decimal
return string

DealPrecision() public static method

deal with value according to precision
public static DealPrecision ( double value, int precision ) : double
value double original value will be dealed
precision int precision wanted to be set
return double

DoubleToString() public static method

convert double into string
public static DoubleToString ( double value, ValueType valueType ) : string
value double double value need to convert
valueType System.ValueType value type
return string

StringToDouble() public static method

convert string into double
public static StringToDouble ( string value, ValueType valueType, double &newValue ) : bool
value string string value need to convert
valueType System.ValueType value type
newValue double conversion result
return bool