Add project ConvertFromStrategy
This commit is contained in:
@@ -11,7 +11,7 @@ namespace DataAccess.DTOs.DTOEntities
|
||||
public class AccuracyDTO : IAccuracy
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; set; }
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
[JsonProperty("IterationAccuracy")]
|
||||
public double IterationAccuracy { get; set; }
|
||||
[JsonProperty("MaxIterationCount")]
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace DataAccess.DTOs
|
||||
{
|
||||
const MaterialTypes materialType = MaterialTypes.Concrete;
|
||||
|
||||
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; set; }
|
||||
[JsonProperty("RelativeHumidity")]
|
||||
@@ -29,7 +30,11 @@ namespace DataAccess.DTOs
|
||||
[JsonProperty("MaterialEntityId")]
|
||||
public Guid MaterialEntityId
|
||||
{
|
||||
get => MaterialEntity.Id;
|
||||
get
|
||||
{
|
||||
return MaterialEntity.Id;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
MaterialEntity = ProgramSetting.MaterialRepository.Repository.Single(x => x.Id == value);
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace DataAccess.DTOs
|
||||
public class CrackCalculatorInputDataDTO : ICrackCalculatorInputData
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; set; }
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
[JsonProperty("ForceActions")]
|
||||
public List<IForceAction> ForceActions { get; set; } = new();
|
||||
[JsonProperty("ForcePrimitives")]
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Analyses;
|
||||
using StructureHelperLogic.Models.Analyses;
|
||||
using StructureHelperLogics.Models.Analyses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -22,7 +24,7 @@ namespace DataAccess.DTOs
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,5 +23,9 @@ namespace DataAccess.DTOs
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
public FileVersionDTO() : this (Guid.NewGuid())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
DataAccess/DTOs/DTOEntities/IRootObjectDTO.cs
Normal file
16
DataAccess/DTOs/DTOEntities/IRootObjectDTO.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Projects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public interface IRootObjectDTO
|
||||
{
|
||||
FileVersionDTO FileVersion { get; set; }
|
||||
ProjectDTO Project { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Analyses;
|
||||
using StructureHelperCommon.Models.Projects;
|
||||
using System;
|
||||
|
||||
19
DataAccess/DTOs/DTOEntities/RootObjectDTO.cs
Normal file
19
DataAccess/DTOs/DTOEntities/RootObjectDTO.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Models.Projects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class RootObjectDTO : IRootObjectDTO
|
||||
{
|
||||
[JsonProperty("FileVersion")]
|
||||
public FileVersionDTO FileVersion { get; set; }
|
||||
[JsonProperty("Project")]
|
||||
public ProjectDTO Project { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -81,6 +81,7 @@ namespace DataAccess.DTOs
|
||||
{ (typeof(RectangleNdmPrimitiveDTO), "RectangleNdmPrimitive") },
|
||||
{ (typeof(RectangleShapeDTO), "RectangleShape") },
|
||||
{ (typeof(ReinforcementLibMaterialDTO), "ReinforcementLibMaterial") },
|
||||
{ (typeof(RootObjectDTO), "RootObject") },
|
||||
{ (typeof(MaterialPartialFactorDTO), "MaterialPartialFactor") },
|
||||
{ (typeof(VersionProcessorDTO), "VersionProcessor") },
|
||||
{ (typeof(VisualAnalysisDTO), "VisualAnalysis") },
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace DataAccess.DTOs
|
||||
public class UserCrackInputDataDTO : IUserCrackInputData
|
||||
{
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; set; }
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
[JsonProperty("LengthBetweenCracks")]
|
||||
public double LengthBetweenCracks { get; set; }
|
||||
[JsonProperty("SetLengthBetweenCracks")]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Analyses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -10,15 +11,17 @@ namespace DataAccess.DTOs
|
||||
{
|
||||
public class VisualAnalysisDTO : IVisualAnalysis
|
||||
{
|
||||
|
||||
|
||||
[JsonProperty("Id")]
|
||||
public Guid Id { get; set; }
|
||||
[JsonProperty("Analysis")]
|
||||
public IAnalysis Analysis { get; set; }
|
||||
[JsonIgnore]
|
||||
public Action ActionToRun { get; set; }
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Run()
|
||||
|
||||
Reference in New Issue
Block a user