public static XQt1475OutBlock FromQuery(XQt1475 query) { XQt1475OutBlock block = new XQt1475OutBlock(); block.IsValidData = true; block.InvalidReason = ""; if (query.QueryResult != null && query.QueryResult.IsSystemError == true) { block.IsValidData = false; block.InvalidReason = query.ReceiveMessage; return(block); } try { block.date = query.GetFieldData(block.GetBlockName(), "date", 0).ParseLong("date"); // long 8 block.time = query.GetFieldData(block.GetBlockName(), "time", 0).ParseLong("time"); // long 6 block.rankcnt = query.GetFieldData(block.GetBlockName(), "rankcnt", 0).ParseLong("rankcnt"); // long 3 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public XQt1475OutBlock GetBlock() { XQt1475OutBlock instance = XQt1475OutBlock.FromQuery(this); return(instance); }