Exemplo n.º 1
0
		public static int ToFIX(PosReqType value)
		{
			switch (value)
			{
				case PosReqType.Positions:
					return Positions;
				case PosReqType.Trades:
					return Trades;
				case PosReqType.Exercises:
					return Exercises;
				case PosReqType.Assignments:
					return Assignments;
				default:
					throw new ArgumentException(string.Format("value not supported {0}", value));
			}
		}
Exemplo n.º 2
0
        public int GetMessageSize()                                                     //  подсчет длины строки сообщения
        {
            string tmpString = String.Format("{0}={1}\u0001{2}={3}\u0001{4}={5}\u0001", //  {6}={7}\u0001{8}={9}\u0001
                                             (int)Tags.PosReqID,
                                             PosReqID.ToString(),
                                             (int)Tags.PosReqType,
                                             PosReqType.ToString(),
                                             (int)Tags.SubscriptionRequestType,
                                             SubscriptionRequestType
                                             //(int)Tags.PartyID,
                                             //PartyID.ToString(),
                                             //(int)Tags.PartyRole,
                                             //PartyRole.ToString()
                                             );

            return(tmpString.Length);
        }
Exemplo n.º 3
0
 public override string ToString()                                            //  формирование строки сообщения
 {
     MessageString = String.Format("{0}={1}\u0001{2}={3}\u0001{4}={5}\u0001", //  {6}={7}\u0001{8}={9}\u0001
                                   (int)Tags.PosReqID,
                                   PosReqID.ToString(),
                                   (int)Tags.PosReqType,
                                   PosReqType.ToString(),
                                   (int)Tags.SubscriptionRequestType,
                                   SubscriptionRequestType
                                   //(int)Tags.PartyID,
                                   //PartyID.ToString(),
                                   //(int)Tags.PartyRole,
                                   //PartyRole.ToString()
                                   );
     MessageSize = MessageString.Length;
     return(MessageString);
 }
Exemplo n.º 4
0
        public static int ToFIX(PosReqType value)
        {
            switch (value)
            {
            case PosReqType.Positions:
                return(Positions);

            case PosReqType.Trades:
                return(Trades);

            case PosReqType.Exercises:
                return(Exercises);

            case PosReqType.Assignments:
                return(Assignments);

            default:
                throw new ArgumentException(string.Format("value not supported {0}", value));
            }
        }