/// <summary> /// Get the UFXEntrustDirection type by a given string. /// </summary> /// <param name="direction">The UFX string value of direction.</param> /// <returns>An enum type value of the UFXEntrustDirection.</returns> public static UFXEntrustDirection GetEntrustDirection(string direction) { return(StringEnumConverter.GetIntType <UFXEntrustDirection>(direction)); }
/// <summary> /// Get the enum type of UFXMarketCode from given string code, which can be converted to integer value. /// </summary> /// <param name="code">A given string code standing for exchange.</param> /// <returns>An enum type value of the exchange.</returns> public static UFXMarketCode GetMarketCode(string code) { return(StringEnumConverter.GetIntType <UFXMarketCode>(code)); }
/// <summary> /// Get the UFXEntrustState type value by a given string status. /// NOTE: the status string should be a char type. It will throw exception while it fails to /// convert into UFXEntrustState. /// </summary> /// <param name="status">The UFX string value of entrust status.</param> /// <returns>An enum type value of the UFXEntrustState</returns> public static UFXEntrustState GetEntrustState(string status) { return(StringEnumConverter.GetCharType <UFXEntrustState>(status)); }
/// <summary> /// Get the UFXFuturesDirection type by a given string. /// </summary> /// <param name="direction">The UFX integer string.</param> /// <returns>An enum type of UFXFuturesDirection.</returns> public static UFXFuturesDirection GetFuturesDirection(string direction) { return(StringEnumConverter.GetIntType <UFXFuturesDirection>(direction)); }