public string Serialize(ClockState state) { var stringBuilder = new StringBuilder(); stringBuilder.AppendLine(state.TopLight == LightState.On ? TopLightColor : TurnedOffLightSymbol); stringBuilder.AppendLine(PrintLine(state.Line1, Line1Colors)); stringBuilder.AppendLine(PrintLine(state.Line2, Line2Colors)); stringBuilder.AppendLine(PrintLine(state.Line3, Line3Colors)); stringBuilder.Append(PrintLine(state.Line4, Line4Colors)); return(stringBuilder.ToString()); }
public ClockStateFluentInterface(ClockState state) { this.state = state; }
private Clock() { State = new ClockState(); }