Exemplo n.º 1
0
 /// <summary>
 /// Determines whether [is not valid] [the specified delivery].
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <param name="deliveries">The using sources.</param>
 /// <returns>
 ///   <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsNotValid(ILearningDelivery delivery, IReadOnlyCollection <ILearningDelivery> deliveries) =>
 !_check.IsRestart(delivery) &&  // <= a singular exclusion clause
 _check.IsStandardApprencticeship(delivery) &&
 delivery.AimType == TypeOfAim.ComponentAimInAProgramme &&
 HasStandardCode(delivery) &&
 !HasQualifyingPeriodOfValidity(GetStartFor(delivery, deliveries), GetPeriodsOfValidityFor(delivery));
Exemplo n.º 2
0
 /// <summary>
 /// Determines whether this delivery is excluded.
 /// </summary>
 /// <param name="thisDelivery">this delivery.</param>
 /// <returns>
 ///   <c>true</c> if this delivery is excluded; otherwise, <c>false</c>.
 /// </returns>
 public bool IsExcluded(ILearningDelivery thisDelivery) =>
 _check.IsStandardApprencticeship(thisDelivery) ||
 _check.IsRestart(thisDelivery);
 /// <summary>
 /// Determines whether [is not valid] [the specified delivery].
 /// </summary>
 /// <param name="thisDelivery">this delivery.</param>
 /// <returns>
 ///   <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsNotValid(ILearningDelivery thisDelivery) =>
 !_check.IsRestart(thisDelivery) &&
 _check.IsStandardApprencticeship(thisDelivery) &&
 _check.InAProgramme(thisDelivery) &&
 It.Has(thisDelivery.StdCodeNullable) &&
 !HasQualifyingStart(thisDelivery, GetStandardPeriodsOfValidityFor(thisDelivery));
 /// <summary>
 /// Determines whether [has restrictions match] [the specified candidate].
 /// </summary>
 /// <param name="candidate">The candidate.</param>
 /// <param name="andDelivery">The and delivery.</param>
 /// <returns>
 ///   <c>true</c> if [has restrictions match] [the specified candidate]; otherwise, <c>false</c>.
 /// </returns>
 public bool HasRestrictionsMatch(ILearningDelivery candidate, ILearningDelivery andDelivery) =>
 _check.IsStandardApprencticeship(candidate) &&
 _check.InAProgramme(candidate) &&
 HasMatchingStandardCode(candidate, andDelivery);