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); }