/// <summary> /// Gets all the stochast names present in the <paramref name="subMechanismIllustrationPoint"/>. /// </summary> /// <param name="subMechanismIllustrationPoint">The <see cref="SubMechanismIllustrationPoint"/> /// to retrieve stochast names from.</param> /// <returns>A list of all stochast names.</returns> /// <exception cref="ArgumentNullException">Thrown when <paramref name="subMechanismIllustrationPoint"/> /// is <c>null</c>.</exception> public static IEnumerable <string> GetStochastNames(this SubMechanismIllustrationPoint subMechanismIllustrationPoint) { if (subMechanismIllustrationPoint == null) { throw new ArgumentNullException(nameof(subMechanismIllustrationPoint)); } return(subMechanismIllustrationPoint.Stochasts.Select(s => s.Name)); }
/// <summary> /// Creates a new instance of <see cref="TopLevelSubMechanismIllustrationPoint"/>. /// </summary> /// <param name="windDirection">The wind direction.</param> /// <param name="closingSituation">The closing situation.</param> /// <param name="subMechanismIllustrationPoint">The illustration point.</param> /// <exception cref="ArgumentNullException">Thrown when any input parameter is <c>null</c>.</exception> public TopLevelSubMechanismIllustrationPoint(WindDirection windDirection, string closingSituation, SubMechanismIllustrationPoint subMechanismIllustrationPoint) : base(windDirection, closingSituation) { if (subMechanismIllustrationPoint == null) { throw new ArgumentNullException(nameof(subMechanismIllustrationPoint)); } SubMechanismIllustrationPoint = subMechanismIllustrationPoint; }