Use shorter syntax for json properties

This commit is contained in:
Archi
2022-03-22 16:33:47 +01:00
parent 6c570738ee
commit cc83222c3e
26 changed files with 90 additions and 90 deletions

View File

@@ -279,7 +279,7 @@ public sealed class GlobalConfig {
[Range(ushort.MinValue, ushort.MaxValue)]
public ushort WebLimiterDelay { get; private set; } = DefaultWebLimiterDelay;
[JsonProperty(PropertyName = nameof(WebProxy))]
[JsonProperty(nameof(WebProxy))]
public string? WebProxyText { get; private set; } = DefaultWebProxyText;
[JsonProperty]
@@ -315,7 +315,7 @@ public sealed class GlobalConfig {
private WebProxy? BackingWebProxy;
private string? BackingWebProxyPassword = DefaultWebProxyPassword;
[JsonProperty(PropertyName = $"{SharedInfo.UlongCompatibilityStringPrefix}{nameof(SteamOwnerID)}", Required = Required.DisallowNull)]
[JsonProperty($"{SharedInfo.UlongCompatibilityStringPrefix}{nameof(SteamOwnerID)}", Required = Required.DisallowNull)]
private string SSteamOwnerID {
get => SteamOwnerID.ToString(CultureInfo.InvariantCulture);

View File

@@ -96,10 +96,10 @@ public sealed class GlobalDatabase : SerializableFile {
}
}
[JsonProperty(PropertyName = $"_{nameof(CellID)}", Required = Required.DisallowNull)]
[JsonProperty($"_{nameof(CellID)}", Required = Required.DisallowNull)]
private uint BackingCellID;
[JsonProperty(PropertyName = $"_{nameof(LastChangeNumber)}", Required = Required.DisallowNull)]
[JsonProperty($"_{nameof(LastChangeNumber)}", Required = Required.DisallowNull)]
private uint BackingLastChangeNumber;
private GlobalDatabase(string filePath) : this() {