/// <summary> /// Initialises a new instance of the <see cref="SetDriverGapMessage"/> class and /// specifies if the Id of the driver and the gap. /// </summary> /// <param name="driverId">The Id of the driver.</param> /// <param name="gap">The gap.</param> /// <exception cref="System.ArgumentOutOfRangeException"> /// Thrown when <paramref name="driverId"/> is not positive. /// </exception> /// <exception cref="System.ArgumentNullException"> /// Thrown when <paramref name="gap"/> is <see langword="null"/>. /// </exception> public SetDriverGapMessage(int driverId, Gap gap) : base(driverId) { Guard.NotNull(gap, "gap"); Gap = gap; }
/// <summary> /// Initialises a new instance of the <see cref="SetDriverIntervalMessage"/> class and /// specifies if the Id of the driver and the interval. /// </summary> /// <param name="driverId">The Id of the driver.</param> /// <param name="interval">The interval.</param> /// <exception cref="System.ArgumentOutOfRangeException"> /// Thrown when <paramref name="driverId"/> is not positive. /// </exception> /// <exception cref="System.ArgumentNullException"> /// Thrown when <paramref name="interval"/> is <see langword="null"/>. /// </exception> public SetDriverIntervalMessage(int driverId, Gap interval) : base(driverId) { Guard.NotNull(interval, "interval"); Interval = interval; }
public static string GapTime(Gap value) { if(value == null) { return String.Empty; } TimeGap time = value as TimeGap; if(time != null) { return GapTime(time); } return GapTime((LapGap)value); }