예제 #1
0
        public static XRs2_OutBlock FromQuery(XRs2_ query)
        {
            XRs2_OutBlock block = new XRs2_OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            try
            {
                block.offerho = query.GetFieldData(block.GetBlockName(), "offerho").ParseLong("offerho");       // long 8
                block.bidho   = query.GetFieldData(block.GetBlockName(), "bidho").ParseLong("bidho");           // long 8
                block.shcode  = query.GetFieldData(block.GetBlockName(), "shcode").TrimEnd('?');                // char 6
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
예제 #2
0
        public XRs2_OutBlock GetBlock()
        {
            XRs2_OutBlock instance = XRs2_OutBlock.FromQuery(this);

            return(instance);
        }