public static XQt1973OutBlock1[] ListFromQuery(XQt1973 query) { int count = query.GetBlockCount(XQt1973OutBlock1.BlockName); List <XQt1973OutBlock1> list = new List <XQt1973OutBlock1>(); if (query.QueryResult != null && query.QueryResult.IsSystemError == true) { return(list.ToArray()); } for (int i = 0; i < count; i++) { XQt1973OutBlock1 block = new XQt1973OutBlock1(); block.IsValidData = true; block.InvalidReason = ""; try { block.chetime = query.GetFieldData(block.GetBlockName(), "chetime", i).TrimEnd('?'); // char 8 block.yeprice = query.GetFieldData(block.GetBlockName(), "yeprice", i).ParseLong("yeprice"); // long 8 block.yegubun = query.GetFieldData(block.GetBlockName(), "yegubun", i).FirstOrDefault(); // char 1 block.jnilysign = query.GetFieldData(block.GetBlockName(), "jnilysign", i).FirstOrDefault(); // char 1 block.jnilychange = query.GetFieldData(block.GetBlockName(), "jnilychange", i).ParseLong("jnilychange"); // long 8 block.yediff = query.GetFieldData(block.GetBlockName(), "yediff", i).ParseFloat("yediff"); // float 6.2 block.yevolume = query.GetFieldData(block.GetBlockName(), "yevolume", i).ParseLong("yevolume"); // long 12 block.ymdvolume = query.GetFieldData(block.GetBlockName(), "ymdvolume", i).ParseLong("ymdvolume"); // long 12 block.ymsvolume = query.GetFieldData(block.GetBlockName(), "ymsvolume", i).ParseLong("ymsvolume"); // long 12 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } list.Add(block); } return(list.ToArray()); }
public XQt1973OutBlock1[] GetBlock1s() { XQt1973OutBlock1[] instance = XQt1973OutBlock1.ListFromQuery(this); return(instance); }