Ejemplo n.º 1
0
        public void Add(F2B_FWDATA_TYPE0_ENUM type, byte[] data)
        {
            int size = 0;

            if (!DataSize.TryGetValue(type, out size))
            {
                throw new ArgumentException("Unable to add rule with unknown type size: " + type);
            }

            cachedHash = null;

            writer.Write((byte)type);
            writer.Write(data);
        }
Ejemplo n.º 2
0
        public void Add(byte[] data)
        {
            if (data.Length == 0)
            {
                // skip empty data
                return;
            }

            int size = 0;
            F2B_FWDATA_TYPE0_ENUM type = (F2B_FWDATA_TYPE0_ENUM)data[0];

            if (!DataSize.TryGetValue(type, out size))
            {
                throw new ArgumentException("Unable to add rule with unknown type size: " + type);
            }

            cachedHash = null;

            writer.Write(data);
        }