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);
        }
Exemplo n.º 4
0
 protected bool Equals(Blink1Duration other)
 {
     return(High == other.High && Low == other.Low);
 }
 public EnableInactivityModeCommand(Blink1Duration waitDuration)
 {
     this.waitDuration = waitDuration;
 }
Exemplo n.º 6
0
 protected bool Equals(Blink1Duration other)
 {
     return High == other.High && Low == other.Low;
 }
Exemplo n.º 7
0
 public FadeToColorCommand(Color color, Blink1Duration duration, LEDPosition ledPosition)
 {
     this.color = color;
     this.duration = duration;
     this.ledPosition = ledPosition;
 }
Exemplo n.º 8
0
 public FadeToColorCommand(Color color, Blink1Duration duration) : this(color, duration, LEDPosition.Both)
 {
 }
Exemplo n.º 9
0
 public Blink1Preset(Color color, TimeSpan duration)
 {
     Color = color;
     this.duration = duration;
 }