コード例 #1
0
        public static BizMsgReferenceMsgType Read(XmlElement xml, string name)
        {
            string str = FixmlUtil.ReadString(xml, name);

            if (!dict.ContainsKey(str))
            {
                FixmlUtil.Error(xml, name, str, "- unknown BizReferenceMsgType");
            }
            return(dict[str]);
        }
コード例 #2
0
        public static BizMsgRejectReason Read(XmlElement xml, string name)
        {
            int number = FixmlUtil.ReadInt(xml, name);

            if (!Enum.IsDefined(typeof(BizMsgRejectReason), (BizMsgRejectReason)number))
            {
                FixmlUtil.Error(xml, name, number, "- unknown BizRejectReason");
            }
            return((BizMsgRejectReason)number);
        }
コード例 #3
0
        public static MDRejectReason Read(XmlElement xml, string name)
        {
            char ch = FixmlUtil.ReadChar(xml, name);

            if (!Enum.IsDefined(typeof(MDRejectReason), (MDRejectReason)ch))
            {
                FixmlUtil.Error(xml, name, ch, "- unknown MDRejectReason");
            }
            return((MDRejectReason)ch);
        }
コード例 #4
0
        public static UserStatus Read(XmlElement xml, string name)
        {
            int number = FixmlUtil.ReadInt(xml, name);

            if (!Enum.IsDefined(typeof(UserStatus), (UserStatus)number))
            {
                FixmlUtil.Error(xml, name, number, "- unknown UserStatus");
            }
            return((UserStatus)number);
        }
コード例 #5
0
        public static OrderSide Read(XmlElement xml, string name)
        {
            char ch = FixmlUtil.ReadChar(xml, name);

            if (!Enum.IsDefined(typeof(OrderSide), (OrderSide)ch))
            {
                FixmlUtil.Error(xml, name, ch, "- unknown OrderSide");
            }
            return((OrderSide)ch);
        }
コード例 #6
0
        public static ExecReportType?Read(XmlElement xml, string name, bool optional)
        {
            char?ch = FixmlUtil.ReadChar(xml, name, optional);

            if (ch == null)
            {
                return(null);
            }
            if (!Enum.IsDefined(typeof(ExecReportType), (ExecReportType)ch))
            {
                FixmlUtil.Error(xml, name, ch, "- unknown ExecType");
            }
            return((ExecReportType)ch);
        }
コード例 #7
0
        public static OrdTimeInForce?Read(XmlElement xml, string name)
        {
            char?ch = FixmlUtil.ReadChar(xml, name, true);

            if (ch == null)
            {
                return(null);
            }
            if (!Enum.IsDefined(typeof(OrdTimeInForce), (OrdTimeInForce)ch))
            {
                FixmlUtil.Error(xml, name, ch, "- unknown OrdTimeInForce");
            }
            return((OrdTimeInForce)ch);
        }
コード例 #8
0
        public static OrdRejectReason?Read(XmlElement xml, string name, bool optional)
        {
            int?number = FixmlUtil.ReadInt(xml, name, optional);

            if (number == null)
            {
                return(null);
            }
            if (!Enum.IsDefined(typeof(OrdRejectReason), (OrdRejectReason)number))
            {
                FixmlUtil.Error(xml, name, number, "- unknown OrderRejectReason");
            }
            return((OrdRejectReason)number);
        }
コード例 #9
0
        public static TrdSesStatRejectReason Read(XmlElement xml, string name)
        {
            int?number = FixmlUtil.ReadInt(xml, name, true);

            if (number == null)
            {
                return(TrdSesStatRejectReason.None);
            }
            if (!Enum.IsDefined(typeof(TrdSesStatRejectReason), (TrdSesStatRejectReason)number))
            {
                FixmlUtil.Error(xml, name, number, "- unknown TrdSesStatRejectReason");
            }
            return((TrdSesStatRejectReason)number);
        }
コード例 #10
0
        public static TradingSessionPhase Read(XmlElement xml, string name)
        {
            string str = FixmlUtil.ReadString(xml, name, true);

            if (str == null)
            {
                return(TradingSessionPhase.Unknown);
            }
            uint number;

            if (uint.TryParse(str, out number))
            {
                if (Enum.IsDefined(typeof(TradingSessionPhase), (TradingSessionPhase)number))
                {
                    return((TradingSessionPhase)number);
                }
            }
            if (!dict.ContainsKey(str))
            {
                FixmlUtil.Error(xml, name, str, "- unknown TradingSessionPhase");
            }
            return(dict[str]);
        }