public PacketAttribute(long a, long b) { Type = new PacketType(a, b); }
public UnsupportedPacketError(PacketType type) { Type = type; }
/// <summary> /// Reads the next PAR2 packet of the given packet type. /// </summary> /// <param name="type">The packet type.</param> /// <returns>A <see cref="Packet"/> object of the given type, read from the stream; /// <see cref="null"/> null if there are no more packets of the given type.</returns> public Packet ReadPacket(PacketType type) { return packets.Where(x => BaseStream.Position <= x.Key && x.Value == type).Select(x => ReadPacket(x.Key)).FirstOrDefault(); }