Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NormalSysExEvent"/> with the
        /// specified data.
        /// </summary>
        /// <param name="data">Data of the sysex event.</param>
        public NormalSysExEvent(byte[] data)
            : this()
        {
            ThrowIfArgument.StartsWithInvalidValue(
                nameof(data),
                data,
                EventStatusBytes.Global.NormalSysEx,
                $"First data byte mustn't be {EventStatusBytes.Global.NormalSysEx} ({EventStatusBytes.Global.NormalSysEx:X2}) since it will be used automatically.");

            Data = data;
        }