Beispiel #1
0
        public static XRFX0OutBlock FromQuery(XRFX0 query)
        {
            XRFX0OutBlock block = new XRFX0OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            try
            {
                block.upstep     = query.GetFieldData(block.GetBlockName(), "upstep").TrimEnd('?');                 // char 2
                block.dnstep     = query.GetFieldData(block.GetBlockName(), "dnstep").TrimEnd('?');                 // char 2
                block.uplmtprice = query.GetFieldData(block.GetBlockName(), "uplmtprice").ParseFloat("uplmtprice"); // float 6.2
                block.dnlmtprice = query.GetFieldData(block.GetBlockName(), "dnlmtprice").ParseFloat("dnlmtprice"); // float 6.2
                block.futcode    = query.GetFieldData(block.GetBlockName(), "futcode").TrimEnd('?');                // char 8
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Beispiel #2
0
        public XRFX0OutBlock GetBlock()
        {
            XRFX0OutBlock instance = XRFX0OutBlock.FromQuery(this);

            return(instance);
        }