Exemple #1
0
        public static XRh2_OutBlock FromQuery(XRh2_ query)
        {
            XRh2_OutBlock block = new XRh2_OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            try
            {
                block.hotime        = query.GetFieldData(block.GetBlockName(), "hotime").TrimEnd('?');                      // char 6
                block.tmofferrem    = query.GetFieldData(block.GetBlockName(), "tmofferrem").ParseLong("tmofferrem");       // long 12
                block.tmbidrem      = query.GetFieldData(block.GetBlockName(), "tmbidrem").ParseLong("tmbidrem");           // long 12
                block.pretmoffercha = query.GetFieldData(block.GetBlockName(), "pretmoffercha").ParseLong("pretmoffercha"); // long 12
                block.pretmbidcha   = query.GetFieldData(block.GetBlockName(), "pretmbidcha").ParseLong("pretmbidcha");     // long 12
                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);
        }
Exemple #2
0
        public XRh2_OutBlock GetBlock()
        {
            XRh2_OutBlock instance = XRh2_OutBlock.FromQuery(this);

            return(instance);
        }