// Copyright (C) Stichting Deltares 2018. All rights reserved.
//
// This file is part of Ringtoets.
//
// Ringtoets is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
// All names, logos, and references to "Deltares" are registered trademarks of
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
using System;
using System.Collections.Generic;
using Core.Common.Base.Geometry;
namespace Ringtoets.Integration.IO.Assembly
{
///
/// Class that holds all the information to export the assembly results
/// of an assessment section.
///
public class ExportableAssessmentSection
{
///
/// Creates an instance of .
///
/// The name of the assessment section.
/// The id of the assessment section.
/// The geometry of the assessment section.
/// The assembly result of the assessment section.
/// The total assembly result with probability
/// of the failure mechanisms.
/// The total assembly result without probability
/// of the failure mechanisms.
/// The assembly results with probability of failure
/// mechanisms belonging to this assessment section.
/// The assembly results without probability
/// of failure mechanisms belonging to this assessment section.
/// The combined section assembly results
/// of this assessment section.
/// Thrown when any parameter is null.
public ExportableAssessmentSection(string name,
string id,
IEnumerable geometry,
ExportableAssessmentSectionAssemblyResult assessmentSectionAssembly,
ExportableFailureMechanismAssemblyResultWithProbability failureMechanismAssemblyWithProbability,
ExportableFailureMechanismAssemblyResult failureMechanismAssemblyWithoutProbability,
IEnumerable> failureMechanismsWithProbability,
IEnumerable> failureMechanismsWithoutProbability,
IEnumerable combinedSectionAssemblyResults)
{
if (name == null)
{
throw new ArgumentNullException(nameof(name));
}
if (id == null)
{
throw new ArgumentNullException(nameof(id));
}
if (geometry == null)
{
throw new ArgumentNullException(nameof(geometry));
}
if (assessmentSectionAssembly == null)
{
throw new ArgumentNullException(nameof(assessmentSectionAssembly));
}
if (failureMechanismAssemblyWithProbability == null)
{
throw new ArgumentNullException(nameof(failureMechanismAssemblyWithProbability));
}
if (failureMechanismAssemblyWithoutProbability == null)
{
throw new ArgumentNullException(nameof(failureMechanismAssemblyWithoutProbability));
}
if (failureMechanismsWithProbability == null)
{
throw new ArgumentNullException(nameof(failureMechanismsWithProbability));
}
if (failureMechanismsWithoutProbability == null)
{
throw new ArgumentNullException(nameof(failureMechanismsWithoutProbability));
}
if (combinedSectionAssemblyResults == null)
{
throw new ArgumentNullException(nameof(combinedSectionAssemblyResults));
}
Name = name;
Id = id;
Geometry = geometry;
AssessmentSectionAssembly = assessmentSectionAssembly;
FailureMechanismAssemblyWithProbability = failureMechanismAssemblyWithProbability;
FailureMechanismAssemblyWithoutProbability = failureMechanismAssemblyWithoutProbability;
FailureMechanismsWithProbability = failureMechanismsWithProbability;
FailureMechanismsWithoutProbability = failureMechanismsWithoutProbability;
CombinedSectionAssemblies = combinedSectionAssemblyResults;
}
///
/// Gets the name of the assessment section.
///
public string Name { get; }
///
/// Gets the id of the assessment section.
///
public string Id { get; }
///
/// Gets the geometry of the assessment section.
///
public IEnumerable Geometry { get; }
///
/// Gets the assembly result of the assessment section.
///
public ExportableAssessmentSectionAssemblyResult AssessmentSectionAssembly { get; }
///
/// Gets the total assembly result of the failure mechanisms with probability.
///
public ExportableFailureMechanismAssemblyResultWithProbability FailureMechanismAssemblyWithProbability { get; }
///
/// Gets the total assembly result of the failure mechanism without probability.
///
public ExportableFailureMechanismAssemblyResult FailureMechanismAssemblyWithoutProbability { get; }
///
/// Gets the collection of assembly results with probability of failure mechanisms belonging to this assessment section.
///
public IEnumerable> FailureMechanismsWithProbability { get; }
///
/// Gets the collection of assembly results without probability of failure mechanisms belonging to this assessment section.
///
public IEnumerable> FailureMechanismsWithoutProbability { get; }
///
/// Gets the collection of combined section assembly results of this assessment section.
///
public IEnumerable CombinedSectionAssemblies { get; }
}
}