public EnableInactivityModeCommand(Blink1Duration waitDuration, bool maintainState, ushort startPosition,
     ushort endPosition)
 {
     this.waitDuration = waitDuration;
     this.maintainState = maintainState;
     this.startPosition = startPosition;
     this.endPosition = endPosition;
 }
        public void ImplicitConversionToTimeSpan(uint timeInMilliseconds, uint expected)
        {
            var ts = TimeSpan.FromMilliseconds(timeInMilliseconds);

            var sut = new Blink1Duration(ts);

            TimeSpan actual = sut;

            Assert.Equal(expected, actual.TotalMilliseconds);
        }
        public void LowIsSetCorrectlyFromTimeSpanCtorInput(uint timeInMilliseconds, byte expected)
        {
            var ts = TimeSpan.FromMilliseconds(timeInMilliseconds);

            var sut = new Blink1Duration(ts);

            var actual = sut.Low;

            Assert.Equal(expected, actual);
        }
예제 #4
0
 protected bool Equals(Blink1Duration other)
 {
     return(High == other.High && Low == other.Low);
 }
 public EnableInactivityModeCommand(Blink1Duration waitDuration)
 {
     this.waitDuration = waitDuration;
 }
예제 #6
0
 protected bool Equals(Blink1Duration other)
 {
     return High == other.High && Low == other.Low;
 }
예제 #7
0
 public FadeToColorCommand(Color color, Blink1Duration duration, LEDPosition ledPosition)
 {
     this.color = color;
     this.duration = duration;
     this.ledPosition = ledPosition;
 }
예제 #8
0
 public FadeToColorCommand(Color color, Blink1Duration duration) : this(color, duration, LEDPosition.Both)
 {
 }
예제 #9
0
 public Blink1Preset(Color color, TimeSpan duration)
 {
     Color = color;
     this.duration = duration;
 }