示例#1
0
        public static XQt1717OutBlock[] ListFromQuery(XQt1717 query)
        {
            int count = query.GetBlockCount(XQt1717OutBlock.BlockName);
            List <XQt1717OutBlock> list = new List <XQt1717OutBlock>();

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQt1717OutBlock block = new XQt1717OutBlock();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.date        = query.GetFieldData(block.GetBlockName(), "date", i).TrimEnd('?');                    // char 8
                    block.close       = query.GetFieldData(block.GetBlockName(), "close", i).ParseLong("close");             // long 8
                    block.sign        = query.GetFieldData(block.GetBlockName(), "sign", i).FirstOrDefault();                // char 1
                    block.change      = query.GetFieldData(block.GetBlockName(), "change", i).ParseLong("change");           // long 8
                    block.diff        = query.GetFieldData(block.GetBlockName(), "diff", i).ParseFloat("diff");              // float 6.2
                    block.volume      = query.GetFieldData(block.GetBlockName(), "volume", i).ParseLong("volume");           // long 12
                    block.tjj0000_vol = query.GetFieldData(block.GetBlockName(), "tjj0000_vol", i).ParseLong("tjj0000_vol"); // long 12
                    block.tjj0001_vol = query.GetFieldData(block.GetBlockName(), "tjj0001_vol", i).ParseLong("tjj0001_vol"); // long 12
                    block.tjj0002_vol = query.GetFieldData(block.GetBlockName(), "tjj0002_vol", i).ParseLong("tjj0002_vol"); // long 12
                    block.tjj0003_vol = query.GetFieldData(block.GetBlockName(), "tjj0003_vol", i).ParseLong("tjj0003_vol"); // long 12
                    block.tjj0004_vol = query.GetFieldData(block.GetBlockName(), "tjj0004_vol", i).ParseLong("tjj0004_vol"); // long 12
                    block.tjj0005_vol = query.GetFieldData(block.GetBlockName(), "tjj0005_vol", i).ParseLong("tjj0005_vol"); // long 12
                    block.tjj0006_vol = query.GetFieldData(block.GetBlockName(), "tjj0006_vol", i).ParseLong("tjj0006_vol"); // long 12
                    block.tjj0007_vol = query.GetFieldData(block.GetBlockName(), "tjj0007_vol", i).ParseLong("tjj0007_vol"); // long 12
                    block.tjj0008_vol = query.GetFieldData(block.GetBlockName(), "tjj0008_vol", i).ParseLong("tjj0008_vol"); // long 12
                    block.tjj0009_vol = query.GetFieldData(block.GetBlockName(), "tjj0009_vol", i).ParseLong("tjj0009_vol"); // long 12
                    block.tjj0010_vol = query.GetFieldData(block.GetBlockName(), "tjj0010_vol", i).ParseLong("tjj0010_vol"); // long 12
                    block.tjj0011_vol = query.GetFieldData(block.GetBlockName(), "tjj0011_vol", i).ParseLong("tjj0011_vol"); // long 12
                    block.tjj0018_vol = query.GetFieldData(block.GetBlockName(), "tjj0018_vol", i).ParseLong("tjj0018_vol"); // long 12
                    block.tjj0016_vol = query.GetFieldData(block.GetBlockName(), "tjj0016_vol", i).ParseLong("tjj0016_vol"); // long 12
                    block.tjj0017_vol = query.GetFieldData(block.GetBlockName(), "tjj0017_vol", i).ParseLong("tjj0017_vol"); // long 12
                    block.tjj0000_dan = query.GetFieldData(block.GetBlockName(), "tjj0000_dan", i).ParseLong("tjj0000_dan"); // long 12
                    block.tjj0001_dan = query.GetFieldData(block.GetBlockName(), "tjj0001_dan", i).ParseLong("tjj0001_dan"); // long 12
                    block.tjj0002_dan = query.GetFieldData(block.GetBlockName(), "tjj0002_dan", i).ParseLong("tjj0002_dan"); // long 12
                    block.tjj0003_dan = query.GetFieldData(block.GetBlockName(), "tjj0003_dan", i).ParseLong("tjj0003_dan"); // long 12
                    block.tjj0004_dan = query.GetFieldData(block.GetBlockName(), "tjj0004_dan", i).ParseLong("tjj0004_dan"); // long 12
                    block.tjj0005_dan = query.GetFieldData(block.GetBlockName(), "tjj0005_dan", i).ParseLong("tjj0005_dan"); // long 12
                    block.tjj0006_dan = query.GetFieldData(block.GetBlockName(), "tjj0006_dan", i).ParseLong("tjj0006_dan"); // long 12
                    block.tjj0007_dan = query.GetFieldData(block.GetBlockName(), "tjj0007_dan", i).ParseLong("tjj0007_dan"); // long 12
                    block.tjj0008_dan = query.GetFieldData(block.GetBlockName(), "tjj0008_dan", i).ParseLong("tjj0008_dan"); // long 12
                    block.tjj0009_dan = query.GetFieldData(block.GetBlockName(), "tjj0009_dan", i).ParseLong("tjj0009_dan"); // long 12
                    block.tjj0010_dan = query.GetFieldData(block.GetBlockName(), "tjj0010_dan", i).ParseLong("tjj0010_dan"); // long 12
                    block.tjj0011_dan = query.GetFieldData(block.GetBlockName(), "tjj0011_dan", i).ParseLong("tjj0011_dan"); // long 12
                    block.tjj0018_dan = query.GetFieldData(block.GetBlockName(), "tjj0018_dan", i).ParseLong("tjj0018_dan"); // long 12
                    block.tjj0016_dan = query.GetFieldData(block.GetBlockName(), "tjj0016_dan", i).ParseLong("tjj0016_dan"); // long 12
                    block.tjj0017_dan = query.GetFieldData(block.GetBlockName(), "tjj0017_dan", i).ParseLong("tjj0017_dan"); // long 12
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }
示例#2
0
 public XQt1717OutBlock[] GetBlocks()
 {
     XQt1717OutBlock[] instance = XQt1717OutBlock.ListFromQuery(this);
     return(instance);
 }