-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
81 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/c#/GeneralUpdate.Common/Internal/JsonContext/PacketJsonContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using System.Text.Json.Serialization; | ||
using GeneralUpdate.Common.Shared.Object; | ||
|
||
namespace GeneralUpdate.Common.Internal.JsonContext; | ||
|
||
[JsonSerializable(typeof(Packet))] | ||
public partial class PacketJsonContext : JsonSerializerContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace GeneralUpdate.Common.Shared.Object; | ||
|
||
/// <summary> | ||
/// Currently used only for upgrade push. | ||
/// </summary> | ||
public class Packet | ||
{ | ||
[JsonPropertyName("Name")] | ||
public string? Name { get; set; } | ||
|
||
[JsonPropertyName("Hash")] | ||
public string Hash { get; set; } | ||
|
||
[JsonPropertyName("ReleaseDate")] | ||
public DateTime? ReleaseDate { get; set; } | ||
|
||
[JsonPropertyName("Url")] | ||
public string? Url { get; set; } | ||
|
||
[JsonPropertyName("Version")] | ||
public string? Version { get; set; } | ||
|
||
[JsonPropertyName("AppType")] | ||
public int? AppType { get; set; } | ||
|
||
[JsonPropertyName("Platform")] | ||
public int? Platform { get; set; } | ||
|
||
[JsonPropertyName("ProductId")] | ||
public string? ProductId { get; set; } | ||
|
||
[JsonPropertyName("IsForcibly")] | ||
public bool? IsForcibly { get; set; } | ||
|
||
[JsonPropertyName("IsFreeze")] | ||
public bool? IsFreeze { get; set; } | ||
} |