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); }
public XRs2_OutBlock GetBlock() { XRs2_OutBlock instance = XRs2_OutBlock.FromQuery(this); return(instance); }