Beispiel #1
0
        private static PacketArray CreateArrayOfArrayOfAtomics()
        {
            PacketArray packetArrayOfArrays = new PacketArray();

            packetArrayOfArrays.Add(new Packet(CreateArrayOfAtomics(), PacketType.Array));
            packetArrayOfArrays.Add(new Packet(CreateArrayOfAtomics(), PacketType.Array));
            packetArrayOfArrays.Add(new Packet(CreateArrayOfAtomics(), PacketType.Array));

            return(packetArrayOfArrays);
        }
Beispiel #2
0
        private static PacketArray CreateArrayOfStrings()
        {
            PacketArray packetArrayOfAtomics = new PacketArray();

            packetArrayOfAtomics.Add(new Packet("Hey", PacketType.Atomic));
            packetArrayOfAtomics.Add(new Packet("Ho", PacketType.Atomic));
            packetArrayOfAtomics.Add(new Packet("Hey", PacketType.Atomic));
            packetArrayOfAtomics.Add(new Packet("Ho", PacketType.Atomic));

            return(packetArrayOfAtomics);
        }
Beispiel #3
0
        private static PacketArray CreateArrayOfAtomics()
        {
            PacketArray packetArrayOfAtomics = new PacketArray();

            packetArrayOfAtomics.Add(new Packet((int)1, PacketType.Atomic));
            packetArrayOfAtomics.Add(new Packet((int)2, PacketType.Atomic));
            packetArrayOfAtomics.Add(new Packet((int)3, PacketType.Atomic));
            packetArrayOfAtomics.Add(new Packet((int)4, PacketType.Atomic));

            return(packetArrayOfAtomics);
        }
Beispiel #4
0
        private static PacketArray CreateArrayOfDatasets(params PacketDataset[] datasets)
        {
            PacketArray pa = new PacketArray();

            foreach (PacketDataset d in datasets)
            {
                pa.Add(new Packet(d, PacketType.Dataset));
            }
            return(pa);
        }
Beispiel #5
0
        public static PacketArray AtomicArrayFrom(IDataRowReader reader)
        {
            PacketArray array = new PacketArray();

            using (ReaderGuard rg = new ReaderGuard(reader))
            {
                while (reader.HasNext())
                {
                    array.Add(new Packet(reader.ReadNext().FetchField(0), PacketType.Atomic));
                }
            }

            return(array);
        }
Beispiel #6
0
        public static PacketArray DatasetArrayFrom(IDataRowReader reader)
        {
            PacketArray array = new PacketArray();

            using (ReaderGuard rg = new ReaderGuard(reader))
            {
                while (reader.HasNext())
                {
                    array.Add(new Packet(DatasetFromRow(reader.Headers, reader.ReadNext()), PacketType.Dataset));
                }
            }

            return(array);
        }