/// <summary> /// Creates a new instance of <see cref="SerializableCombinedFailureMechanismSectionAssembly"/>. /// </summary> /// <param name="id">The unique assembly ID.</param> /// <param name="totalAssemblyResult">The total assembly result this assembly belongs to.</param> /// <param name="section">The section this assembly belongs to.</param> /// <param name="failureMechanismResults">The collection of assembly results for this assembly per failure mechanism.</param> /// <param name="combinedSectionResult">The combined assembly result for this assembly.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter except <paramref name="id"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown when <paramref name="id"/> is invalid.</exception> public SerializableCombinedFailureMechanismSectionAssembly(string id, SerializableTotalAssemblyResult totalAssemblyResult, SerializableFailureMechanismSection section, SerializableCombinedFailureMechanismSectionAssemblyResult[] failureMechanismResults, SerializableFailureMechanismSubSectionAssemblyResult combinedSectionResult) : this() { SerializableIdValidator.ThrowIfInvalid(id); if (totalAssemblyResult == null) { throw new ArgumentNullException(nameof(totalAssemblyResult)); } if (section == null) { throw new ArgumentNullException(nameof(section)); } if (failureMechanismResults == null) { throw new ArgumentNullException(nameof(failureMechanismResults)); } if (combinedSectionResult == null) { throw new ArgumentNullException(nameof(combinedSectionResult)); } Id = id; TotalAssemblyResultId = totalAssemblyResult.Id; FailureMechanismSectionId = section.Id; FailureMechanismResults = failureMechanismResults; CombinedSectionResult = combinedSectionResult; }
/// <summary> /// Creates a new instance of <see cref="SerializableFailureMechanism"/>. /// </summary> /// <param name="id">The unique assembly ID.</param> /// <param name="failureMechanismType">The type of the failure mechanism.</param> /// <param name="code">The code of the failure mechanism.</param> /// <param name="name">The name of the failure mechanism.</param> /// <param name="totalAssemblyResult">The total assembly result the failure mechanism belongs to.</param> /// <param name="failureMechanismAssemblyResult">The total failure mechanism assembly result.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter except <paramref name="id"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown when <paramref name="id"/> is invalid.</exception> public SerializableFailureMechanism(string id, SerializableFailureMechanismType failureMechanismType, string code, string name, SerializableTotalAssemblyResult totalAssemblyResult, SerializableFailureMechanismAssemblyResult failureMechanismAssemblyResult) : this() { SerializableIdValidator.ThrowIfInvalid(id); if (totalAssemblyResult == null) { throw new ArgumentNullException(nameof(totalAssemblyResult)); } if (failureMechanismAssemblyResult == null) { throw new ArgumentNullException(nameof(failureMechanismAssemblyResult)); } Id = id; FailureMechanismType = failureMechanismType; TotalAssemblyResultId = totalAssemblyResult.Id; GenericFailureMechanismCode = code; SpecificFailureMechanismName = name; FailureMechanismAssemblyResult = failureMechanismAssemblyResult; }
/// <summary> /// Creates a new instance of <see cref="SerializableAssembly"/>. /// </summary> /// <param name="id">The unique assembly ID.</param> /// <param name="lowerCorner">The lower corner of the assembly map boundary.</param> /// <param name="upperCorner">The upper corner of the assembly map boundary.</param> /// <param name="assessmentSection">The <see cref="SerializableAssessmentSection"/> that belongs to the assembly.</param> /// <param name="assessmentProcess">The <see cref="SerializableAssessmentProcess"/> that belongs to the assembly.</param> /// <param name="totalAssemblyResult">The <see cref="SerializableTotalAssemblyResult"/> that belongs to the assembly.</param> /// <param name="failureMechanisms">The collection of <see cref="SerializableFailureMechanism"/> that /// belong to the assembly.</param> /// <param name="failureMechanismSectionAssemblies">The collection of <see cref="SerializableFailureMechanismSectionAssembly"/> that /// belong to the assembly.</param> /// <param name="combinedFailureMechanismSectionAssemblies">The collection of <see cref="SerializableCombinedFailureMechanismSectionAssembly"/> that /// belong to the assembly.</param> /// <param name="failureMechanismSectionCollections">The collection of <see cref="SerializableFailureMechanismSectionCollection"/> that /// belong to the assembly.</param> /// <param name="failureMechanismSections">The collection of <see cref="SerializableFailureMechanismSection"/> that /// belong to the assembly.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter except <paramref name="id"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown when <paramref name="id"/> is invalid.</exception> public SerializableAssembly(string id, Point2D lowerCorner, Point2D upperCorner, SerializableAssessmentSection assessmentSection, SerializableAssessmentProcess assessmentProcess, SerializableTotalAssemblyResult totalAssemblyResult, IEnumerable <SerializableFailureMechanism> failureMechanisms, IEnumerable <SerializableFailureMechanismSectionAssembly> failureMechanismSectionAssemblies, IEnumerable <SerializableCombinedFailureMechanismSectionAssembly> combinedFailureMechanismSectionAssemblies, IEnumerable <SerializableFailureMechanismSectionCollection> failureMechanismSectionCollections, IEnumerable <SerializableFailureMechanismSection> failureMechanismSections) { SerializableIdValidator.ThrowIfInvalid(id); if (lowerCorner == null) { throw new ArgumentNullException(nameof(lowerCorner)); } if (upperCorner == null) { throw new ArgumentNullException(nameof(upperCorner)); } if (assessmentSection == null) { throw new ArgumentNullException(nameof(assessmentSection)); } if (assessmentProcess == null) { throw new ArgumentNullException(nameof(assessmentProcess)); } if (totalAssemblyResult == null) { throw new ArgumentNullException(nameof(totalAssemblyResult)); } if (failureMechanisms == null) { throw new ArgumentNullException(nameof(failureMechanisms)); } if (failureMechanismSectionAssemblies == null) { throw new ArgumentNullException(nameof(failureMechanismSectionAssemblies)); } if (combinedFailureMechanismSectionAssemblies == null) { throw new ArgumentNullException(nameof(combinedFailureMechanismSectionAssemblies)); } if (failureMechanismSectionCollections == null) { throw new ArgumentNullException(nameof(failureMechanismSectionCollections)); } if (failureMechanismSections == null) { throw new ArgumentNullException(nameof(failureMechanismSections)); } Id = id; Boundary = new SerializableBoundary(lowerCorner, upperCorner); var featureMembers = new List <SerializableFeatureMember> { assessmentSection, assessmentProcess, totalAssemblyResult }; featureMembers.AddRange(failureMechanisms); featureMembers.AddRange(failureMechanismSectionAssemblies); featureMembers.AddRange(combinedFailureMechanismSectionAssemblies); featureMembers.AddRange(failureMechanismSectionCollections); featureMembers.AddRange(failureMechanismSections); FeatureMembers = featureMembers.ToArray(); }