TapCommon-Unity/UI/gen/AchievementLocalizationItem...

88 lines
2.3 KiB
C#
Raw Permalink Normal View History

2022-12-05 19:55:41 +08:00
// <auto-generated />
//
// To parse this JSON data, add NuGet 'LC.Newtonsoft.Json' then do:
//
// using Localization.Achievement;
//
// var achievementLocalizationItems = AchievementLocalizationItems.FromJson(jsonString);
namespace Localization.Achievement
{
using System;
using System.Collections.Generic;
using System.Globalization;
using LC.Newtonsoft.Json;
using LC.Newtonsoft.Json.Converters;
using TapSDK.UI;
public partial class AchievementLocalizationItems
{
[JsonProperty("items")]
public Items Items { get; set; }
public Item Current
{
get
{
switch (LocalizationMgr.Instance.CurrentLanguageType)
{
case ELanguageType.cn:
return this.Items.Cn;
case ELanguageType.en:
return this.Items.En;
default:
return this.Items.Cn;
}
}
}
public const string PATH = "Config/AchievementLocalization";
}
public partial class Items
{
[JsonProperty("cn")]
public Item Cn { get; set; }
[JsonProperty("en")]
public Item En { get; set; }
}
public partial class Item
{
[JsonProperty("NetError")]
public string NetError { get; set; }
[JsonProperty("NoVerification")]
public string NoVerification { get; set; }
[JsonProperty("EnterGame")]
public string EnterGame { get; set; }
[JsonProperty("ExitGame")]
public string ExitGame { get; set; }
}
public partial class AchievementLocalizationItems
{
public static AchievementLocalizationItems FromJson(string json) => JsonConvert.DeserializeObject<AchievementLocalizationItems>(json, Localization.Achievement.Converter.Settings);
}
public static class Serialize
{
public static string ToJson(this AchievementLocalizationItems self) => JsonConvert.SerializeObject(self, Localization.Achievement.Converter.Settings);
}
internal static class Converter
{
public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
{
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
DateParseHandling = DateParseHandling.None,
Converters =
{
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
},
};
}
}