示例#1
0
            public void ChannelPrefixEvent()
            {
                var  ticks = 200836u;
                byte data  = 128;

                var x = new ChannelPrefixEvent(ticks, data);
                var y = ReDeserialize(x);

                Assert.That(x.Ticks == y.Ticks);
                Assert.That(x.data == y.data);
            }
示例#2
0
        /// <summary>
        /// Determines whether the specified event is equal to the current one.
        /// </summary>
        /// <param name="channelPrefixEvent">The event to compare with the current one.</param>
        /// <param name="respectDeltaTime">If true the <see cref="MidiEvent.DeltaTime"/> will be taken into an account
        /// while comparing events; if false - delta-times will be ignored.</param>
        /// <returns>true if the specified event is equal to the current one; otherwise, false.</returns>
        public bool Equals(ChannelPrefixEvent channelPrefixEvent, bool respectDeltaTime)
        {
            if (ReferenceEquals(null, channelPrefixEvent))
            {
                return(false);
            }

            if (ReferenceEquals(this, channelPrefixEvent))
            {
                return(true);
            }

            return(base.Equals(channelPrefixEvent, respectDeltaTime) && Channel == channelPrefixEvent.Channel);
        }
示例#3
0
 public ChannelPrefixEventLabel(ChannelPrefixEvent channelPrefixEvent) : base(channelPrefixEvent)
 {
 }
示例#4
0
 /// <summary>
 /// Determines whether the specified event is equal to the current one.
 /// </summary>
 /// <param name="channelPrefixEvent">The event to compare with the current one.</param>
 /// <returns>true if the specified event is equal to the current one; otherwise, false.</returns>
 public bool Equals(ChannelPrefixEvent channelPrefixEvent)
 {
     return(Equals(channelPrefixEvent, true));
 }