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