/// <summary> /// Initializes a new instance of the <see cref="SignalSample{T}" /> class. /// </summary> /// <param name="unitOfOutput"> /// The discrete unit of output that was read from the channel's output stream. /// </param> /// <param name="lookBehindRange"> /// A range of discrete units of output preceding <paramref name="unitOfOutput" /> in the channel's output stream, or an /// empty range if look-behind was not requested. /// </param> /// <param name="lookAheadRange"> /// A range of discrete units of output following <paramref name="unitOfOutput" /> in the channel's output stream, or an /// empty range if look-ahead was not requested. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="unitOfOutput" /> is <see langword="null" /> -or- <paramref name="lookAheadRange" /> is /// <see langword="null" /> -or- <paramref name="lookBehindRange" /> is <see langword="null" />. /// </exception> public SignalSample(DiscreteUnitOfOutput <T> unitOfOutput, OutputRange <T> lookBehindRange, OutputRange <T> lookAheadRange) { UnitOfOutput = unitOfOutput.RejectIf().IsNull(nameof(unitOfOutput)); LookAheadRange = lookAheadRange.RejectIf().IsNull(nameof(lookAheadRange)); LookBehindRange = lookBehindRange.RejectIf().IsNull(nameof(lookBehindRange)); }
/// <summary> /// Initializes a new instance of the <see cref="SignalSample{T}" /> class. /// </summary> /// <param name="unitOfOutput"> /// The discrete unit of output that was read from the channel's output stream. /// </param> /// <param name="lookBehindRange"> /// A range of discrete units of output preceding <paramref name="unitOfOutput" /> in the channel's output stream, or an /// empty range if look-behind was not requested. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="unitOfOutput" /> is <see langword="null" /> -or- <paramref name="lookBehindRange" /> is /// <see langword="null" />. /// </exception> public SignalSample(DiscreteUnitOfOutput <T> unitOfOutput, OutputRange <T> lookBehindRange) : this(unitOfOutput, lookBehindRange, new OutputRange <T>()) { return; }