update<project>: downgrade .NET to 4.6; using Newtonsoft.JSON instead of System.Text.Json; using ILRepack to publish single executable file

This commit is contained in:
leo 2020-12-31 16:34:52 +08:00
parent dc17bb4b12
commit 0af951bb9a
11 changed files with 30 additions and 45 deletions

View file

@ -1,9 +1,9 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
using System.Windows.Threading;
@ -15,14 +15,14 @@ namespace SourceGit.Git {
public class Repository {
#region HOOKS
public Action<string> OnNavigateCommit = null;
public Action OnWorkingCopyChanged = null;
public Action OnTagChanged = null;
public Action OnStashChanged = null;
public Action OnBranchChanged = null;
public Action OnCommitsChanged = null;
public Action OnSubmoduleChanged = null;
public Action OnClosing = null;
[JsonIgnore] public Action<string> OnNavigateCommit = null;
[JsonIgnore] public Action OnWorkingCopyChanged = null;
[JsonIgnore] public Action OnTagChanged = null;
[JsonIgnore] public Action OnStashChanged = null;
[JsonIgnore] public Action OnBranchChanged = null;
[JsonIgnore] public Action OnCommitsChanged = null;
[JsonIgnore] public Action OnSubmoduleChanged = null;
[JsonIgnore] public Action OnClosing = null;
#endregion
#region PROPERTIES_SAVED

View file

@ -1,5 +1,5 @@
using Newtonsoft.Json;
using System;
using System.Text.Json.Serialization;
namespace SourceGit.Git {
@ -7,19 +7,19 @@ namespace SourceGit.Git {
/// Version information.
/// </summary>
public class Version {
[JsonPropertyName("id")]
[JsonProperty(PropertyName = "id")]
public ulong Id { get; set; }
[JsonPropertyName("tag_name")]
[JsonProperty(PropertyName = "tag_name")]
public string TagName { get; set; }
[JsonPropertyName("target_commitish")]
[JsonProperty(PropertyName = "target_commitish")]
public string CommitSHA { get; set; }
[JsonPropertyName("prerelease")]
[JsonProperty(PropertyName = "prerelease")]
public bool PreRelease { get; set; }
[JsonPropertyName("name")]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
[JsonPropertyName("body")]
[JsonProperty(PropertyName = "body")]
public string Body { get; set; }
[JsonPropertyName("created_at")]
[JsonProperty(PropertyName = "created_at")]
public DateTime CreatedAt { get; set; }
}
}