From 7d59c15b0efd2aa5a27aef356a265f850a2e7e2f Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 13 Jan 2026 06:24:07 +0800 Subject: Add JSON result getters for command outputs --- .../JsonResults/Implements/InfoResult.cs | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 CommandLineWrapper/JsonResults/Implements/InfoResult.cs (limited to 'CommandLineWrapper/JsonResults/Implements/InfoResult.cs') 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 +{ + private string _mappingName; + + public InfoResultGetter(string mappingName) + => _mappingName = mappingName; + + protected override Task 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 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; } +} -- cgit