fix: support Visual Studio 2026 package loading
This commit is contained in:
@@ -2,26 +2,28 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Prophet.CoopWithDsh
|
||||
{
|
||||
[DataContract]
|
||||
internal sealed class OpenDocument
|
||||
{
|
||||
[JsonProperty("path")] public string Path { get; set; } = string.Empty;
|
||||
[JsonProperty("label")] public string Label { get; set; } = string.Empty;
|
||||
[JsonProperty("dirty")] public bool Dirty { get; set; }
|
||||
[DataMember(Name = "path", Order = 1)] public string Path { get; set; } = string.Empty;
|
||||
[DataMember(Name = "label", Order = 2)] public string Label { get; set; } = string.Empty;
|
||||
[DataMember(Name = "dirty", Order = 3)] public bool Dirty { get; set; }
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
internal sealed class OpenFileSnapshot
|
||||
{
|
||||
[JsonProperty("version")] public int Version { get; set; } = 1;
|
||||
[JsonProperty("instanceId")] public string InstanceId { get; set; } = string.Empty;
|
||||
[JsonProperty("ide")] public string Ide { get; set; } = "visualstudio";
|
||||
[JsonProperty("processId")] public int ProcessId { get; set; }
|
||||
[JsonProperty("workspace", NullValueHandling = NullValueHandling.Ignore)] public string? Workspace { get; set; }
|
||||
[JsonProperty("updatedAt")] public string UpdatedAt { get; set; } = string.Empty;
|
||||
[JsonProperty("documents")] public IReadOnlyList<OpenDocument> Documents { get; set; } = Array.Empty<OpenDocument>();
|
||||
[DataMember(Name = "version", Order = 1)] public int Version { get; set; } = 1;
|
||||
[DataMember(Name = "instanceId", Order = 2)] public string InstanceId { get; set; } = string.Empty;
|
||||
[DataMember(Name = "ide", Order = 3)] public string Ide { get; set; } = "visualstudio";
|
||||
[DataMember(Name = "processId", Order = 4)] public int ProcessId { get; set; }
|
||||
[DataMember(Name = "workspace", Order = 5, EmitDefaultValue = false)] public string? Workspace { get; set; }
|
||||
[DataMember(Name = "updatedAt", Order = 6)] public string UpdatedAt { get; set; } = string.Empty;
|
||||
[DataMember(Name = "documents", Order = 7)] public OpenDocument[] Documents { get; set; } = Array.Empty<OpenDocument>();
|
||||
}
|
||||
|
||||
internal static class SnapshotModel
|
||||
|
||||
Reference in New Issue
Block a user