public SimpleInputContext(SimpleStructureInput wrappedData, StructuresCalculation <SimpleStructureInput> calculation, IFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(wrappedData, calculation, failureMechanism, assessmentSection) { }
private static StandAloneFailureMechanismView <IFailureMechanism <FailureMechanismSectionResult>, FailureMechanismSectionResult> CreateView( IFailureMechanism <FailureMechanismSectionResult> failureMechanism, IAssessmentSection assessmentSection) { return(new StandAloneFailureMechanismView <IFailureMechanism <FailureMechanismSectionResult>, FailureMechanismSectionResult>( failureMechanism, assessmentSection, sr => new DefaultFailureMechanismSectionAssemblyResult())); }
/// <summary> /// Asserts whether the <see cref="MapData"/> contains the data that is representative /// for the <paramref name="expectedAssemblyResult"/>. /// </summary> /// <param name="failureMechanism">The <see cref="IFailureMechanism"/> the that contains the original data.</param> /// <param name="expectedAssemblyResult">The expected <see cref="FailureMechanismSectionAssemblyResult"/> that contains the original data.</param> /// <param name="mapData">The <see cref="MapDataCollection"/> that needs to be asserted.</param> /// <exception cref="AssertionException">Thrown when: /// <list type="bullet"> /// <item>the name of the <see cref="MapData"/> is not <c>Duidingsklasse per vak</c>;</item> /// <item>the amount of features in <paramref name="mapData"/> is not equal to the /// amount of the <see cref="IFailureMechanism.Sections"/>;</item> /// <item>the geometries of the features in <paramref name="mapData"/> are not equal to /// the expected geometry of the <see cref="IFailureMechanism.Sections"/>;</item> /// <item>the meta data does not contain the <see cref="FailureMechanismSectionAssemblyGroup"/>.</item> /// </list> /// </exception> public static void AssertAssemblyMapData(IFailureMechanism failureMechanism, FailureMechanismSectionAssemblyResult expectedAssemblyResult, MapData mapData) { var assemblyMapLineData = (MapLineData)mapData; Assert.AreEqual("Duidingsklasse per vak", assemblyMapLineData.Name); MapFeature[] features = assemblyMapLineData.Features.ToArray(); FailureMechanismSection[] sections = failureMechanism.Sections.ToArray(); Assert.AreEqual(sections.Length, features.Length); for (var index = 0; index < sections.Length; index++) { MapFeature feature = features[index]; FailureMechanismSection failureMechanismSection = sections[index]; CollectionAssert.AreEqual(failureMechanismSection.Points, feature.MapGeometries.Single().PointCollections.Single()); Assert.AreEqual(2, feature.MetaData.Count); Assert.AreEqual(EnumDisplayNameHelper.GetDisplayName(expectedAssemblyResult.FailureMechanismSectionAssemblyGroup), feature.MetaData["Duidingsklasse"]); Assert.AreEqual(expectedAssemblyResult.SectionProbability, feature.MetaData["Rekenwaarde faalkans per vak"]); } }
/// <summary> /// Imports <see cref="FailureMechanismSection"/> data for a given enumeration of <see cref="IFailureMechanism{T}"/>. /// </summary> /// <param name="assessmentSection">The <see cref="AssessmentSection"/> that contains the <see cref="IFailureMechanism{T}"/> instances.</param> /// <param name="targetFailureMechanisms">The <see cref="IFailureMechanism{T}"/> instances to import on.</param> /// <remarks> /// <para>This will import the same 283 failure mechanism sections on all failure mechanisms.</para> /// <para>Does not import using <see cref="FileImportActivity"/>.</para> /// </remarks> public static void ImportFailureMechanismSections(AssessmentSection assessmentSection, IEnumerable <IFailureMechanism <FailureMechanismSectionResult> > targetFailureMechanisms) { using (var embeddedResourceFileWriter = new EmbeddedResourceFileWriter(typeof(DataImportHelper).Assembly, true, "traject_6-3_vakken.shp", "traject_6-3_vakken.dbf", "traject_6-3_vakken.prj", "traject_6-3_vakken.shx")) { IFailureMechanism <FailureMechanismSectionResult>[] failureMechanisms = targetFailureMechanisms.ToArray(); for (var i = 0; i < failureMechanisms.Length; i++) { IFailureMechanism <FailureMechanismSectionResult> failureMechanism = failureMechanisms[i]; if (i == 0) { string filePath = Path.Combine(embeddedResourceFileWriter.TargetFolderPath, "traject_6-3_vakken.shp"); var importer = new FailureMechanismSectionsImporter( failureMechanism, assessmentSection.ReferenceLine, filePath, new FailureMechanismSectionReplaceStrategy(failureMechanism), new ImportMessageProvider()); importer.Import(); } else { // Copy same FailureMechanismSection instances to other failure mechanisms FailureMechanismTestHelper.SetSections(failureMechanism, failureMechanisms[0].Sections.Select(DeepCloneSection).ToArray()); } } } }
public void SetUp() { mockRepository = new MockRepository(); handler = mockRepository.Stub <IObservablePropertyChangeHandler>(); assessmentSection = mockRepository.Stub <IAssessmentSection>(); failureMechanism = mockRepository.Stub <IFailureMechanism>(); }
private static FailureMechanismSectionAssemblyGroup?GetAssemblyGroup(IFailureMechanism failureMechanism, IDictionary <IFailureMechanism, int> failureMechanisms, IEnumerable <FailureMechanismSectionAssemblyGroup> failureMechanismResults) { return(failureMechanisms.ContainsKey(failureMechanism) ? failureMechanismResults.ElementAt(failureMechanisms[failureMechanism]) : (FailureMechanismSectionAssemblyGroup?)null); }
private static void AddEntitiesForFailureMechanismSections(this IFailureMechanism specificFailureMechanism, PersistenceRegistry registry, IFailureMechanismEntity entity) { foreach (FailureMechanismSection failureMechanismSection in specificFailureMechanism.Sections) { entity.FailureMechanismSectionEntities.Add(failureMechanismSection.Create(registry)); } }
/// <summary> /// Creates a new instance of <see cref="FailureMechanismMergeDataRow"/>. /// </summary> /// <param name="failureMechanism">The wrapped <see cref="IFailureMechanism"/>.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="failureMechanism"/> /// is <c>null</c>.</exception> public FailureMechanismMergeDataRow(IFailureMechanism failureMechanism) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } FailureMechanism = failureMechanism; }
private static void AssertDataGridViewRow(IFailureMechanism expectedFailureMechanism, DataGridViewCellCollection cells) { Assert.AreEqual(false, cells[isSelectedIndex].Value); Assert.AreEqual(expectedFailureMechanism.Name, cells[failureMechanismNameIndex].Value); Assert.AreEqual(expectedFailureMechanism.InAssembly, cells[inAssemblyIndex].Value); Assert.AreEqual(expectedFailureMechanism.Sections.Any(), cells[hasSectionsIndex].Value); Assert.AreEqual(0, cells[numberOfCalculationsIndex].Value); }
private static IFailureMechanism[] GetFailureMechanisms(IFailureMechanism failureMechanism) { return(failureMechanism == null ? Enumerable.Empty <IFailureMechanism>().ToArray() : new[] { failureMechanism }); }
/// <summary> /// Creates a new instance of <see cref="CloseForFailureMechanismView"/>. /// </summary> /// <param name="failureMechanism">The failure mechanism belonging to the view.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="failureMechanism"/> /// is <c>null</c>.</exception> protected CloseForFailureMechanismView(IFailureMechanism failureMechanism) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } FailureMechanism = failureMechanism; }
private static void AssertAssemblyCells(IFailureMechanism failureMechanism, double assemblyResult, DataGridViewCellCollection cells) { Assert.AreEqual(expectedColumnCount, cells.Count); Assert.AreEqual(failureMechanism.Name, cells[failureMechanismNameColumnIndex].Value); Assert.AreEqual(failureMechanism.Code, cells[failureMechanismCodeColumnIndex].Value); Assert.AreEqual(ProbabilityFormattingHelper.FormatWithDiscreteNumbers(assemblyResult), cells[failureMechanismProbabilityColumnIndex].FormattedValue); }
/// <summary> /// Creates a new instance of <see cref="FailureMechanismSectionReplaceStrategy"/>. /// </summary> /// <param name="failureMechanism">The failure mechanism to set the sections to.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="failureMechanism"/> /// is <c>null</c>.</exception> public FailureMechanismSectionReplaceStrategy(IFailureMechanism <FailureMechanismSectionResult> failureMechanism) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } this.failureMechanism = failureMechanism; }
/// <summary> /// Initializes a new instance of the <see cref="FailureMechanismSectionsContext"/> class. /// </summary> /// <param name="wrappedData">The failure mechanism to wrap.</param> /// <param name="assessmentSection">The owning assessment section of <paramref name="wrappedData"/>.</param> /// <exception cref="ArgumentNullException">Thrown when any input argument is <c>null</c>.</exception> public FailureMechanismSectionsContext(IFailureMechanism <FailureMechanismSectionResult> wrappedData, IAssessmentSection assessmentSection) : base(wrappedData) { if (assessmentSection == null) { throw new ArgumentNullException(nameof(assessmentSection)); } AssessmentSection = assessmentSection; }
private FailureMechanismSectionsView ShowFailureMechanismSectionsView(IEnumerable <FailureMechanismSection> sections, IFailureMechanism failureMechanism) { var view = new FailureMechanismSectionsView(sections, failureMechanism); testForm.Controls.Add(view); testForm.Show(); return(view); }
private static FailureMechanismAssemblyResultRow CreateManualAssemblyRow(IFailureMechanism failureMechanism) { FailureMechanismAssemblyResult assemblyResult = failureMechanism.AssemblyResult; string validationError = FailureMechanismAssemblyResultValidationHelper.GetValidationError(assemblyResult); return(!string.IsNullOrEmpty(validationError) ? new FailureMechanismAssemblyResultRow(failureMechanism, validationError) : new FailureMechanismAssemblyResultRow(failureMechanism, assemblyResult.ManualFailureMechanismAssemblyProbability)); }
/// <summary> /// Creates a <see cref="FailureMechanismEntity"/> based on the information of the <see cref="IFailureMechanism"/>. /// </summary> /// <param name="mechanism">The failure mechanism to create a database entity for.</param> /// <param name="type">The type of the failure mechanism that is being created.</param> /// <param name="registry">The object keeping track of create operations.</param> /// <returns>A new <see cref="FailureMechanismEntity"/>.</returns> /// <exception cref="ArgumentNullException">Thrown when <paramref name="registry"/> is <c>null</c>.</exception> internal static FailureMechanismEntity Create(this IFailureMechanism mechanism, FailureMechanismType type, PersistenceRegistry registry) { if (registry == null) { throw new ArgumentNullException(nameof(registry)); } var entity = Create <FailureMechanismEntity>(mechanism, registry); entity.FailureMechanismType = (short)type; return(entity); }
private static FailureMechanismAssemblyResultRow CreateAutomaticAssemblyRow(IFailureMechanism failureMechanism, Func <FailureMechanismAssemblyResultWrapper> performAssemblyFunc) { try { double assemblyResult = performAssemblyFunc().AssemblyResult; return(new FailureMechanismAssemblyResultRow(failureMechanism, assemblyResult)); } catch (AssemblyException e) { return(new FailureMechanismAssemblyResultRow(failureMechanism, e.Message)); } }
private static void AssertExportableFailureMechanism(IFailureMechanism <FailureMechanismSectionResult> failureMechanism, ExportableFailureMechanismType expectedFailureMechanismType, ExportableFailureMechanism actualExportableFailureMechanism) { Assert.AreEqual(expectedFailureMechanismType, actualExportableFailureMechanism.FailureMechanismType); Assert.AreEqual(failureMechanism.Code, actualExportableFailureMechanism.Code); ExportableFailureMechanismAssemblyResult exportableFailureMechanismAssemblyResult = actualExportableFailureMechanism.FailureMechanismAssembly; Assert.AreEqual(0.1, exportableFailureMechanismAssemblyResult.Probability); Assert.AreEqual(ExportableAssemblyMethod.BOI1A1, exportableFailureMechanismAssemblyResult.AssemblyMethod); Assert.AreEqual(failureMechanism.SectionResults.Count(), actualExportableFailureMechanism.SectionAssemblyResults.Count()); }
/// <summary> /// Creates a new instance of <see cref="FailureMechanismSectionUpdateStrategy{T}"/>. /// </summary> /// <param name="failureMechanism">The <see cref="IFailureMechanism"/> to update the sections for.</param> /// <param name="sectionResultUpdateStrategy">The <see cref="IFailureMechanismSectionResultUpdateStrategy{T}"/> to use when updating /// the section results.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> public FailureMechanismSectionUpdateStrategy(IFailureMechanism <T> failureMechanism, IFailureMechanismSectionResultUpdateStrategy <T> sectionResultUpdateStrategy) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } if (sectionResultUpdateStrategy == null) { throw new ArgumentNullException(nameof(sectionResultUpdateStrategy)); } this.failureMechanism = failureMechanism; this.sectionResultUpdateStrategy = sectionResultUpdateStrategy; }
/// <summary> /// Creates a new instance of <see cref="FailureMechanismSectionResultContext{T}"/>. /// </summary> /// <param name="wrappedSectionResults">The <see cref="IObservableEnumerable{T}"/> of <typeparamref name="T"/> to wrap.</param> /// <param name="failureMechanism">The <see cref="IFailureMechanism"/> the <paramref name="wrappedSectionResults"/> belongs to.</param> /// <param name="assessmentSection">The assessment section the section results belongs to.</param> /// <exception cref="ArgumentNullException">Thrown when any input argument is <c>null</c>.</exception> public FailureMechanismSectionResultContext(IObservableEnumerable <T> wrappedSectionResults, IFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(wrappedSectionResults) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } if (assessmentSection == null) { throw new ArgumentNullException(nameof(assessmentSection)); } FailureMechanism = failureMechanism; AssessmentSection = assessmentSection; }
/// <summary> /// Creates a collection of <see cref="MapFeature"/> for instances of <see cref="FailureMechanismSectionAssemblyResult"/>. /// </summary> /// <typeparam name="TSectionResult">The type of section result to create the features for.</typeparam> /// <param name="failureMechanism">The failure mechanism to create the features for.</param> /// <param name="performAssemblyFunc">The <see cref="Func{T,T2}"/> used to assemble the result of a section result.</param> /// <returns>A collection of <see cref="MapFeature"/>.</returns> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> public static IEnumerable <MapFeature> CreateAssemblyGroupFeatures <TSectionResult>( IFailureMechanism <TSectionResult> failureMechanism, Func <TSectionResult, FailureMechanismSectionAssemblyResult> performAssemblyFunc) where TSectionResult : FailureMechanismSectionResult { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } if (performAssemblyFunc == null) { throw new ArgumentNullException(nameof(performAssemblyFunc)); } return(CreateAssemblyGroupFeatures(failureMechanism.SectionResults, performAssemblyFunc).ToArray()); }
/// <summary> /// Creates a stub of <see cref="IAssessmentSection"/>. /// </summary> /// <param name="failureMechanism">The failure mechanism to set the contribution for.</param> /// <param name="mockRepository">The mock repository to create the stub with.</param> /// <param name="filePath">The file path to the hydraulic boundary database (optional).</param> /// <returns>A stubbed <see cref="IAssessmentSection"/>.</returns> /// <remarks>Whether <paramref name="filePath"/> is provided or not, a dummy location with id 1300001 is added to the /// hydraulic boundary database.</remarks> public static IAssessmentSection CreateAssessmentSectionStub(IFailureMechanism failureMechanism, MockRepository mockRepository, string filePath = null) { IFailureMechanism[] failureMechanisms = GetFailureMechanisms(failureMechanism); var assessmentSection = mockRepository.Stub <IAssessmentSection>(); assessmentSection.Stub(a => a.Id).Return("21"); assessmentSection.Stub(a => a.FailureMechanismContribution).Return(new FailureMechanismContribution(0.1, 1.0 / 30000)); assessmentSection.Stub(a => a.GetFailureMechanisms()).Return(failureMechanisms); assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(GetHydraulicBoundaryDatabase(filePath)); assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); assessmentSection.Replay(); return(assessmentSection); }
private static T Create <T>(this IFailureMechanism failureMechanism, PersistenceRegistry registry) where T : IFailureMechanismEntity, new() { FailureMechanismAssemblyResult assemblyResult = failureMechanism.AssemblyResult; var entity = new T { InAssembly = Convert.ToByte(failureMechanism.InAssembly), InAssemblyInputComments = failureMechanism.InAssemblyInputComments.Body.DeepClone(), InAssemblyOutputComments = failureMechanism.InAssemblyOutputComments.Body.DeepClone(), NotInAssemblyComments = failureMechanism.NotInAssemblyComments.Body.DeepClone(), FailureMechanismSectionCollectionSourcePath = failureMechanism.FailureMechanismSectionSourcePath.DeepClone(), FailureMechanismAssemblyResultProbabilityResultType = Convert.ToByte(assemblyResult.ProbabilityResultType), FailureMechanismAssemblyResultManualFailureMechanismAssemblyProbability = assemblyResult.ManualFailureMechanismAssemblyProbability.ToNaNAsNull() }; AddEntitiesForFailureMechanismSections(failureMechanism, registry, entity); return(entity); }
public void GivenSpecificFailureMechanismsContainsItems_WhenAddSpecificFailureMechanism_ThenItemAddedAndNotifyObservers() { // Given var observer = mocks.StrictMock <IObserver>(); observer.Expect(o => o.UpdateObserver()); var failureMechanisms = new ObservableList <SpecificFailureMechanism> { new SpecificFailureMechanism { Name = "Nieuw faalmechanisme" } }; var assessmentSection = mocks.Stub <IAssessmentSection>(); var context = new SpecificFailureMechanismsContext(failureMechanisms, assessmentSection); context.Attach(observer); var menuBuilder = new CustomItemsOnlyContextMenuBuilder(); using (var treeView = new TreeViewControl()) { IGui gui = StubFactory.CreateGuiStub(mocks); gui.Stub(cmp => cmp.Get(context, treeView)).Return(menuBuilder); mocks.ReplayAll(); plugin.Gui = gui; using (ContextMenuStrip menu = info.ContextMenuStrip(context, assessmentSection, treeView)) { // When menu.Items[contextMenuCreateFailureMechanismIndex].PerformClick(); // Then Assert.AreEqual(2, failureMechanisms.Count); IFailureMechanism addedItem = failureMechanisms.Last(); Assert.IsInstanceOf <SpecificFailureMechanism>(addedItem); Assert.AreEqual("Nieuw faalmechanisme (1)", addedItem.Name); } } }
/// <summary> /// Creates a new instance of <see cref="FailureMechanismSectionsProbabilityAssessmentView"/>. /// </summary> /// <param name="sections">The sections to be displayed in the view.</param> /// <param name="failureMechanism">The failure mechanism the view belongs to.</param> /// <param name="probabilityAssessmentInput">The probability assessment input belonging to the /// failure mechanism.</param> /// <exception cref="ArgumentNullException">Thrown when any input parameter is <c>null</c>.</exception> public FailureMechanismSectionsProbabilityAssessmentView(IEnumerable <FailureMechanismSection> sections, IFailureMechanism failureMechanism, ProbabilityAssessmentInput probabilityAssessmentInput) : base(sections, failureMechanism) { if (probabilityAssessmentInput == null) { throw new ArgumentNullException(nameof(probabilityAssessmentInput)); } this.probabilityAssessmentInput = probabilityAssessmentInput; failureMechanismSectionsDataGridViewControl.AddTextBoxColumn(nameof(FailureMechanismSectionProbabilityAssessmentRow.N), Resources.FailureMechanismSectionProbabilityAssessment_N_Rounded_DisplayName, true); failureMechanismObserver = new Observer(HandleProbabilityAssessmentInputChange) { Observable = failureMechanism }; }
/// <summary> /// Creates a new instance of <see cref="FailureMechanismAssemblyResultRow"/> with a specified probability. /// </summary> /// <param name="failureMechanism">The <see cref="IFailureMechanism"/> to wrap so that it can be displayed as a row.</param> /// <param name="failureMechanismAssemblyResult">The assembly result of the failure mechanism.</param> /// <param name="errorMessage">The error message to display.</param> /// <exception cref="ArgumentNullException">Thrown when <see cref="failureMechanism"/> or <paramref name="errorMessage"/> /// is <c>null</c>.</exception> private FailureMechanismAssemblyResultRow(IFailureMechanism failureMechanism, double failureMechanismAssemblyResult, string errorMessage) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } if (errorMessage == null) { throw new ArgumentNullException(nameof(errorMessage)); } this.failureMechanism = failureMechanism; Probability = failureMechanismAssemblyResult; ColumnStateDefinitions = new Dictionary <int, DataGridViewColumnStateDefinition>(); CreateColumnStateDefinitions(); ColumnStateDefinitions[probabilityIndex].ErrorText = errorMessage; }
private static void AddSections(IFailureMechanism failureMechanism, int numberOfSections, Point2D startPoint, Point2D endPoint) { double endPointStepsX = (endPoint.X - startPoint.X) / numberOfSections; double endPointStepsY = (endPoint.Y - startPoint.Y) / numberOfSections; var sections = new List <FailureMechanismSection>(); for (var i = 1; i <= numberOfSections; i++) { endPoint = new Point2D(startPoint.X + endPointStepsX, startPoint.Y + endPointStepsY); sections.Add(new FailureMechanismSection(i.ToString(), new[] { startPoint, endPoint })); startPoint = endPoint; } SetSections(failureMechanism, sections); }
/// <summary> /// Creates a <see cref="FailureMechanismAssemblyResultRow"/> based on its input arguments. /// </summary> /// <param name="failureMechanism">The <see cref="IFailureMechanism"/> to create the row for.</param> /// <param name="performAssemblyFunc">Performs the assembly for <paramref name="failureMechanism"/>.</param> /// <returns>A <see cref="FailureMechanismAssemblyResultRow"/>.</returns> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> public static FailureMechanismAssemblyResultRow CreateRow(IFailureMechanism failureMechanism, Func <FailureMechanismAssemblyResultWrapper> performAssemblyFunc) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } if (performAssemblyFunc == null) { throw new ArgumentNullException(nameof(performAssemblyFunc)); } if (!failureMechanism.InAssembly) { return(new FailureMechanismAssemblyResultRow(failureMechanism, double.NaN)); } return(failureMechanism.AssemblyResult.IsManualProbability() ? CreateManualAssemblyRow(failureMechanism) : CreateAutomaticAssemblyRow(failureMechanism, performAssemblyFunc)); }
/// <summary> /// Creates a new instance of <see cref="NonCalculatableFailureMechanismSectionResultsMapLayer{TSectionResult}"/>. /// </summary> /// <param name="failureMechanism">The failure mechanism to get the data from.</param> /// <param name="performAssemblyFunc">The <see cref="Func{T1,TResult}"/> used to assemble the result of a section result.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> public NonCalculatableFailureMechanismSectionResultsMapLayer( IFailureMechanism <TSectionResult> failureMechanism, Func <TSectionResult, FailureMechanismSectionAssemblyResult> performAssemblyFunc) { if (failureMechanism == null) { throw new ArgumentNullException(nameof(failureMechanism)); } if (performAssemblyFunc == null) { throw new ArgumentNullException(nameof(performAssemblyFunc)); } this.failureMechanism = failureMechanism; this.performAssemblyFunc = performAssemblyFunc; CreateObservers(); MapData = AssemblyMapDataFactory.CreateFailureMechanismSectionAssemblyMapData(); SetFeatures(); }