public static string ToFormattedString(this TradeField field) { return(string.Format("[InstrumentID={0};ExchangeID={1};Side={2};Qty={3};Price={4};OpenClose={5};HedgeFlag={6};" + "ID={7};TradeID={8};" + "Time={9};Commission={10}]", field.InstrumentID, field.ExchangeID, field.Side, field.Qty, field.Price, field.OpenClose, field.HedgeFlag, field.ID, field.TradeID, field.Time, field.Commission)); }
public static string ToFormattedString([In] this TradeField field) { return(string.Format("[InstrumentID={0};ExchangeID={1};Side={2};Qty={3};Price={4};OpenClose={5};HedgeFlag={6};" + "ID={7};TradeID={8};" + "Date={9};Time={10};Commission={11}]", field.InstrumentID, field.ExchangeID, Enum <OrderSide> .ToString(field.Side), field.Qty, field.Price, Enum <OpenCloseType> .ToString(field.OpenClose), Enum <HedgeFlagType> .ToString(field.HedgeFlag), field.ID, field.TradeID, field.Date, field.Time, field.Commission)); }
static void OnRtnTrade(object sender, ref TradeField trade) { Console.WriteLine("CC " + trade.Time + "CC " + trade.ID + "CC " + trade.TradeID); }