-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix json serializer issues in trimmed mode (#28)
* - Shorten logging to make it clearer - Add more colors to logging to make it clearer - Add more exe exclusion words - Allow NonPublic DefaultConstructor (fixes #26) - Add app version/runtime version at the top for future diagnostics - Fix typos * Fix json serializer reflection issues in trimmed mode
- Loading branch information
Showing
6 changed files
with
27 additions
and
37 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
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
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 |
---|---|---|
@@ -1,55 +1,45 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace SunshineGameFinder | ||
{ | ||
[JsonSourceGenerationOptions(WriteIndented = true)] | ||
[JsonSerializable(typeof(SunshineConfig))] | ||
internal partial class SourceGenerationContext : JsonSerializerContext | ||
{ | ||
} | ||
public class SunshineApp | ||
{ | ||
public string name { get; set; } | ||
|
||
[JsonProperty("image-path")] | ||
[JsonPropertyName("image-path")] | ||
public string imagepath { get; set; } | ||
public List<string> detached { get; set; } | ||
public string output { get; set; } | ||
public string cmd { get; set; } | ||
|
||
[JsonProperty("working-dir")] | ||
[JsonPropertyName("working-dir")] | ||
public string workingdir { get; set; } | ||
|
||
[JsonProperty("exclude-global-prep-cmd")] | ||
[JsonPropertyName("exclude-global-prep-cmd")] | ||
public bool excludeglobalprepcmd { get; set; } | ||
public bool elevated { get; set; } | ||
[JsonProperty("auto-detach")] | ||
[JsonPropertyName("auto-detach")] | ||
public bool autodetach { get; set; } | ||
[JsonProperty("wait-all")] | ||
[JsonPropertyName("wait-all")] | ||
public bool waitall { get; set; } | ||
|
||
[JsonProperty("exit-timeout")] | ||
[JsonPropertyName("exit-timeout")] | ||
public int exittimeout { get; set; } = 5; | ||
} | ||
|
||
public class Env | ||
{ | ||
public string PATH { get; set; } | ||
} | ||
|
||
public class SunshineConfig | ||
{ | ||
public SunshineConfig() | ||
{ | ||
|
||
} | ||
public SunshineConfig(Env env, List<SunshineApp> apps) | ||
{ | ||
this.env = env; | ||
this.apps = apps; | ||
} | ||
|
||
public Env env { get; set; } | ||
public List<SunshineApp> apps { get; set; } | ||
} | ||
} |
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