using CommandLineWrapper; using CommandLineWrapper.JsonResults; using System.Text.Json.Serialization; public class ShareSeeResultGetter : JsonResultGetter { private string _shareId; public ShareSeeResultGetter(string shareId) => _shareId = shareId; protected override Task ExecCommand(JVCSWorkspace workspace) => workspace.ShareSee(_shareId); } public struct SeeShareResult { public string ShareId { get; set; } public string Sharer { get; set; } public string Description { get; set; } public Dictionary Mappings { get; set; } } public struct SheetMappingMetadata { // TIPS // Since SheetMappingMetadata in the serialized output of the command-line tool `jv sheet see ` // comes directly from the version control repository, // its property names use the original lowercase snake_case naming, // so JsonPropertyName must be explicitly specified for mapping. [JsonPropertyName("id")] public string Id { get; set; } [JsonPropertyName("ver")] public string Version { get; set; } }