Add EditorState + Rename ConfigurationResponseModel, ApplicationStateModel
This commit is contained in:
parent
c256a76e01
commit
b86f073cc1
6 changed files with 54 additions and 36 deletions
|
@ -3,9 +3,9 @@ using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace SVGLDLibs.Models
|
namespace SVGLDLibs.Models
|
||||||
{
|
{
|
||||||
public class ConfigurationResponseModel
|
public class Configuration
|
||||||
{
|
{
|
||||||
public ConfigurationResponseModel(AvailableContainerModel mainContainer)
|
public Configuration(AvailableContainerModel mainContainer)
|
||||||
{
|
{
|
||||||
MainContainer = mainContainer;
|
MainContainer = mainContainer;
|
||||||
AvailableContainers = new List<AvailableContainerModel>();
|
AvailableContainers = new List<AvailableContainerModel>();
|
18
csharp/SVGLDLibs/SVGLDLibs/Models/EditorState.cs
Normal file
18
csharp/SVGLDLibs/SVGLDLibs/Models/EditorState.cs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
|
namespace SVGLDLibs.Models
|
||||||
|
{
|
||||||
|
public class EditorState
|
||||||
|
{
|
||||||
|
|
||||||
|
[DataMember(EmitDefaultValue = false)]
|
||||||
|
public List<HistoryState> history { get; set; }
|
||||||
|
|
||||||
|
[DataMember(EmitDefaultValue = false)]
|
||||||
|
public int historyCurrentStep { get; set; }
|
||||||
|
|
||||||
|
[DataMember(EmitDefaultValue = false)]
|
||||||
|
public Configuration configuration { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,6 @@ namespace SVGLDLibs.Models
|
||||||
public class GetFeedbackRequest
|
public class GetFeedbackRequest
|
||||||
{
|
{
|
||||||
[DataMember(EmitDefaultValue = false)]
|
[DataMember(EmitDefaultValue = false)]
|
||||||
public ApplicationStateModel ApplicationState { get; set; }
|
public HistoryState ApplicationState { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,29 +1,29 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace SVGLDLibs.Models
|
namespace SVGLDLibs.Models
|
||||||
{
|
{
|
||||||
public class ApplicationStateModel
|
public class HistoryState
|
||||||
{
|
{
|
||||||
[DataMember(EmitDefaultValue = false)]
|
[DataMember(EmitDefaultValue = false)]
|
||||||
public string lastAction;
|
public string lastAction;
|
||||||
|
|
||||||
[DataMember(EmitDefaultValue = false)]
|
[DataMember(EmitDefaultValue = false)]
|
||||||
public string mainContainer;
|
public string mainContainer;
|
||||||
|
|
||||||
[DataMember(EmitDefaultValue = false)]
|
[DataMember(EmitDefaultValue = false)]
|
||||||
public Dictionary<string, ContainerModel> containers;
|
public Dictionary<string, ContainerModel> containers;
|
||||||
|
|
||||||
[DataMember(EmitDefaultValue = false)]
|
[DataMember(EmitDefaultValue = false)]
|
||||||
public string selectedContainerId;
|
public string selectedContainerId;
|
||||||
|
|
||||||
[DataMember(EmitDefaultValue = false)]
|
[DataMember(EmitDefaultValue = false)]
|
||||||
public Dictionary<string, string> typeCounters;
|
public Dictionary<string, string> typeCounters;
|
||||||
|
|
||||||
[DataMember(EmitDefaultValue = false)]
|
[DataMember(EmitDefaultValue = false)]
|
||||||
public Dictionary<string, SymbolModel> symbols;
|
public Dictionary<string, SymbolModel> symbols;
|
||||||
|
|
||||||
[DataMember(EmitDefaultValue = false)]
|
[DataMember(EmitDefaultValue = false)]
|
||||||
public string selectedSymbolId;
|
public string selectedSymbolId;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,6 +17,6 @@ namespace SVGLDLibs.Models
|
||||||
public ContainerModel NextContainer { get; set; }
|
public ContainerModel NextContainer { get; set; }
|
||||||
|
|
||||||
[DataMember(EmitDefaultValue = false)]
|
[DataMember(EmitDefaultValue = false)]
|
||||||
public ApplicationStateModel ApplicationState { get; set; }
|
public HistoryState ApplicationState { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -20,8 +20,8 @@ public class SVGLDController : ControllerBase
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost(Name = nameof(SVGLDLibs.Models.ApplicationStateModel))]
|
[HttpPost(Name = nameof(SVGLDLibs.Models.HistoryState))]
|
||||||
public bool ApplicationStateModel(ApplicationStateModel model)
|
public bool ApplicationStateModel(HistoryState model)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -44,8 +44,8 @@ public class SVGLDController : ControllerBase
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost(Name = nameof(SVGLDLibs.Models.ConfigurationResponseModel))]
|
[HttpPost(Name = nameof(SVGLDLibs.Models.Configuration))]
|
||||||
public bool ConfigurationResponseModel(ConfigurationResponseModel model)
|
public bool ConfigurationResponseModel(Configuration model)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue