summaryrefslogtreecommitdiff
path: root/CommandLineWrapper/JsonResults/Implements/InfoResult.cs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-01-13 06:24:07 +0800
committer魏曹先生 <1992414357@qq.com>2026-01-13 06:24:07 +0800
commit7d59c15b0efd2aa5a27aef356a265f850a2e7e2f (patch)
tree16f30ff5a7d5d871f0358f792988f369cc532b45 /CommandLineWrapper/JsonResults/Implements/InfoResult.cs
parentb202287c51438d64f769dd72c579664493ba9109 (diff)
Add JSON result getters for command outputs
Diffstat (limited to 'CommandLineWrapper/JsonResults/Implements/InfoResult.cs')
-rw-r--r--CommandLineWrapper/JsonResults/Implements/InfoResult.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/CommandLineWrapper/JsonResults/Implements/InfoResult.cs b/CommandLineWrapper/JsonResults/Implements/InfoResult.cs
new file mode 100644
index 0000000..ecef724
--- /dev/null
+++ b/CommandLineWrapper/JsonResults/Implements/InfoResult.cs
@@ -0,0 +1,30 @@
+using CommandLineWrapper;
+using CommandLineWrapper.JsonResults;
+
+public class InfoResultGetter : JsonResultGetter<InfoResult>
+{
+ private string _mappingName;
+
+ public InfoResultGetter(string mappingName)
+ => _mappingName = mappingName;
+
+ protected override Task<JVCSCommandInvoker.InvokeResult> ExecCommand(JVCSWorkspace workspace)
+ => workspace.Info(_mappingName);
+}
+
+public struct InfoResult
+{
+ public string Mapping { get; set; }
+ public string InRef { get; set; }
+ public string Vfid { get; set; }
+ public List<InfoHistory> Histories { get; set; }
+}
+
+public struct InfoHistory
+{
+ public string Version { get; set; }
+ public string VersionCreator { get; set; }
+ public string VersionDescription { get; set; }
+ public bool IsCurrentVersion { get; set; }
+ public bool IsRefVersion { get; set; }
+}