Change field viewer
This commit is contained in:
@@ -7,12 +7,16 @@ namespace StructureHelperLogics.Models.CrossSections
|
||||
{
|
||||
public class CrossSectionRepository : ICrossSectionRepository
|
||||
{
|
||||
private RepositoryOperationsLogic operations;
|
||||
|
||||
public Guid Id { get; }
|
||||
public List<IForceAction> ForceActions { get; private set; } = new();
|
||||
public List<IHeadMaterial> HeadMaterials { get; private set; } = new();
|
||||
public List<INdmPrimitive> Primitives { get; } = new();
|
||||
public List<ICalculator> Calculators { get; private set; } = new();
|
||||
|
||||
public IRepositoryOperationsLogic Operations => operations ??= new RepositoryOperationsLogic(this);
|
||||
|
||||
public CrossSectionRepository(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
|
||||
namespace StructureHelperLogics.Models.CrossSections
|
||||
{
|
||||
/// <summary>
|
||||
/// Repository of members of cross-section
|
||||
/// </summary>
|
||||
public interface ICrossSectionRepository : ISaveable, IHasHeadMaterials, IHasForcesAndPrimitives, IHasCalculators
|
||||
{
|
||||
|
||||
IRepositoryOperationsLogic Operations { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperLogics.Models.CrossSections
|
||||
{
|
||||
public interface IRepositoryOperationsLogic
|
||||
{
|
||||
IRepositoryOperation<ICrossSectionRepository, INdmPrimitive> Primitives { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
|
||||
namespace StructureHelperLogics.Models.CrossSections
|
||||
{
|
||||
public class RepositoryOperationsLogic : IRepositoryOperationsLogic
|
||||
{
|
||||
private ICrossSectionRepository repository;
|
||||
private RepositoryPrimitiveOperation primitiveLogic;
|
||||
|
||||
public RepositoryOperationsLogic(ICrossSectionRepository repository)
|
||||
{
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
public IRepositoryOperation<ICrossSectionRepository, INdmPrimitive> Primitives => primitiveLogic ??= new RepositoryPrimitiveOperation(repository);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user