/// <summary> /// Throws a ArgumentException if param value not supported /// </summary> /// <param name="enume"></param> /// <returns></returns> public static QuickFix.Fields.OrdType ToField(FIXApplication.Enums.OrderType enume) { switch (enume) { case FIXApplication.Enums.OrderType.Limit: return new QuickFix.Fields.OrdType(QuickFix.Fields.OrdType.LIMIT); case FIXApplication.Enums.OrderType.Market: return new QuickFix.Fields.OrdType(QuickFix.Fields.OrdType.MARKET); } throw new ArgumentException(String.Format("Enum value '{0}' not supported", enume.ToString())); }
/// <summary> /// Throws a ArgumentException if param value not supported /// </summary> /// <param name="enume"></param> /// <returns></returns> public static QuickFix.Fields.TimeInForce ToField(FIXApplication.Enums.TimeInForce enume) { switch (enume) { case FIXApplication.Enums.TimeInForce.Day: return new QuickFix.Fields.TimeInForce(QuickFix.Fields.TimeInForce.DAY); case FIXApplication.Enums.TimeInForce.GoodTillCancel: return new QuickFix.Fields.TimeInForce(QuickFix.Fields.TimeInForce.GOOD_TILL_CANCEL); } throw new ArgumentException(String.Format("Enum value '{0}' not supported", enume.ToString())); }
/// <summary> /// Throws a ArgumentException if param value not supported /// </summary> /// <param name="enume"></param> /// <returns></returns> public static QuickFix.Fields.Side ToField(FIXApplication.Enums.Side enume) { switch (enume) { case FIXApplication.Enums.Side.Buy: return new QuickFix.Fields.Side(QuickFix.Fields.Side.BUY); case FIXApplication.Enums.Side.Sell: return new QuickFix.Fields.Side(QuickFix.Fields.Side.SELL); } throw new ArgumentException(String.Format("Enum value '{0}' not supported", enume.ToString())); }