Nullable refernce types refactoring

This commit is contained in:
Mikhail Shabanov committed 2020-12-27 12:39:25 +01:00
1 parent e5c90e03d3
commit e12734981b
85 files changed
+509 -351

No files matched your search

@@ -14,7 +14,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Account nick
///</summary>
[JsonProperty("account_name")]
public string AccountName { get; set; }
public string? AccountName { get; set; }
///<summary>
/// ClanId
@@ -32,7 +32,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Player clan role
///</summary>
[JsonProperty("role")]
public string Role { get; set; }
public string? Role { get; set; }
}
}
@@ -22,7 +22,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan color in HEX #RRGGBB
///</summary>
[JsonProperty("color")]
public string Color { get; set; }
public string? Color { get; set; }
///<summary>
/// Date of clan creation
@@ -40,25 +40,25 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan creator nick
///</summary>
[JsonProperty("creator_name")]
public string CreatorName { get; set; }
public string? CreatorName { get; set; }
///<summary>
/// Clan description
///</summary>
[JsonProperty("description")]
public string Description { get; set; }
public string? Description { get; set; }
///<summary>
/// Html Clan description
///</summary>
[JsonProperty("description_html")]
public string DescriptionHtml { get; set; }
public string? DescriptionHtml { get; set; }
///<summary>
/// Is clan deleted. Actual info about deleted clan only in fields: clan_id, is_clan_disbanded, updated_at.
///</summary>
[JsonProperty("is_clan_disbanded")]
public bool IsClanDisbanded { get; set; }
public bool? IsClanDisbanded { get; set; }
///<summary>
/// Clan commander accountId
@@ -70,7 +70,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan commander nick
///</summary>
[JsonProperty("leader_name")]
public string LeaderName { get; set; }
public string? LeaderName { get; set; }
///<summary>
/// Clan members count
@@ -82,25 +82,25 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan motto
///</summary>
[JsonProperty("motto")]
public string Motto { get; set; }
public string? Motto { get; set; }
///<summary>
/// Clan name
///</summary>
[JsonProperty("name")]
public string Name { get; set; }
public string? Name { get; set; }
///<summary>
/// Renamed clan name
///</summary>
[JsonProperty("old_name")]
public string OldName { get; set; }
public string? OldName { get; set; }
///<summary>
/// Renamed clan tag
///</summary>
[JsonProperty("old_tag")]
public string OldTag { get; set; }
public string? OldTag { get; set; }
///<summary>
/// Clan renaming time in UTC
@@ -112,7 +112,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan tag
///</summary>
[JsonProperty("tag")]
public string Tag { get; set; }
public string? Tag { get; set; }
///<summary>
/// Clan info updated at
@@ -124,19 +124,19 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan emblems info
///</summary>
[JsonProperty("emblems")]
public WgnClansInfoEmblems Emblems { get; set; }
public WgnClansInfoEmblems? Emblems { get; set; }
///<summary>
/// Clan members information. Depends on members_key field in request.
///</summary>
[JsonProperty("members")]
public WgnClansInfoMembers Members { get; set; }
public WgnClansInfoMembers? Members { get; set; }
///<summary>
/// Private clan info
///</summary>
[JsonProperty("private")]
public WgnClansInfoPrivate Private { get; set; }
public WgnClansInfoPrivate? Private { get; set; }
}
public class WgnClansInfoEmblems
@@ -145,31 +145,31 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// 195x195 px Icons list
///</summary>
[JsonProperty("x195")]
public Dictionary<string, string> X195 { get; set; }
public Dictionary<string, string>? X195 { get; set; }
///<summary>
/// 24x24 px Icons list
///</summary>
[JsonProperty("x24")]
public Dictionary<string, string> X24 { get; set; }
public Dictionary<string, string>? X24 { get; set; }
///<summary>
/// 256x256 px Icons list
///</summary>
[JsonProperty("x256")]
public Dictionary<string, string> X256 { get; set; }
public Dictionary<string, string>? X256 { get; set; }
///<summary>
/// 32x32 px Icons list
///</summary>
[JsonProperty("x32")]
public Dictionary<string, string> X32 { get; set; }
public Dictionary<string, string>? X32 { get; set; }
///<summary>
/// 64x64 px Icons list
///</summary>
[JsonProperty("x64")]
public Dictionary<string, string> X64 { get; set; }
public Dictionary<string, string>? X64 { get; set; }
}
public class WgnClansInfoMembers
@@ -184,7 +184,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan member nick
///</summary>
[JsonProperty("account_name")]
public string AccountName { get; set; }
public string? AccountName { get; set; }
///<summary>
/// Date of joining the clan
@@ -196,19 +196,19 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan member role
///</summary>
[JsonProperty("role")]
public string Role { get; set; }
public string? Role { get; set; }
///<summary>
/// Localized member role
///</summary>
[JsonProperty("role_i18n")]
public string RoleI18n { get; set; }
public string? RoleI18n { get; set; }
}
public class WgnClansInfoPrivate
{
[JsonProperty("online_members")]
public int[] OnlineMembers { get; set; }
public int[]? OnlineMembers { get; set; }
[JsonProperty("treasury")]
public long? Treasury { get; set; }
@@ -26,7 +26,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Player's nick
///</summary>
[JsonProperty("nickname")]
public string Nickname { get; set; }
public string? Nickname { get; set; }
///<summary>
/// Player information update date
@@ -38,12 +38,12 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Private account data
///</summary>
[JsonProperty("private")]
public WotAccountPrivateInfo Private { get; set; }
public WotAccountPrivateInfo? Private { get; set; }
///<summary>
/// Player's statistics
///</summary>
[JsonProperty("statistics")]
public WotAccountStatistics Statistics { get; set; }
public WotAccountStatistics? Statistics { get; set; }
}
}
@@ -14,6 +14,6 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Player nick
///</summary>
[JsonProperty("nickname")]
public string Nickname { get; set; }
public string? Nickname { get; set; }
}
}
@@ -8,7 +8,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Account ban info
///</summary>
[JsonProperty("ban_info")]
public string BanInfo { get; set; }
public string? BanInfo { get; set; }
///<summary>
/// Account ban expiration date
@@ -47,23 +47,22 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
public bool IsPremium { get; set; }
///<summary>
/// Premium accunt expiration time
/// Premium account expiration time
///</summary>
[JsonProperty("premium_expires_at")]
private int? PremiumExpiresAt { get; set; }
///<summary>
///Группы контактов.
///Дополнительное поле.
/// Group of contacts.
///</summary>
[JsonProperty("grouped_contacts")]
public WotAccountPrivateInfoGroupedContacts GroupedContacts { get; set; }
public WotAccountPrivateInfoGroupedContacts? GroupedContacts { get; set; }
///<summary>
///Ограничения аккаунта
/// Account restrictions
///</summary>
[JsonProperty("restrictions")]
public WotAccountPrivateInfoRestrictions Restrictions { get; set; }
public WotAccountPrivateInfoRestrictions? Restrictions { get; set; }
}
}
@@ -9,18 +9,18 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Blocked accountIds
///</summary>
[JsonProperty("blocked")]
public int[] Blocked { get; set; }
public int[]? Blocked { get; set; }
///<summary>
/// Groups
///</summary>
[JsonProperty("groups")]
public Dictionary<string, string> Groups { get; set; }
public Dictionary<string, string>? Groups { get; set; }
///<summary>
/// Ungrouped accountIds
///</summary>
[JsonProperty("ungrouped")]
public int[] Ungrouped { get; set; }
public int[]? Ungrouped { get; set; }
}
}
@@ -9,12 +9,12 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Amount of destroyed by player tanks.
///</summary>
[JsonProperty("frags")]
public Dictionary<string, string> Frags { get; set; }
public Dictionary<string, string>? Frags { get; set; }
///<summary>
/// Full player's statistics
///</summary>
[JsonProperty("all")]
public WotAccountFullStatistics All { get; set; }
public WotAccountFullStatistics? All { get; set; }
}
}
@@ -50,10 +50,10 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Whole statistics
///</summary>
[JsonProperty("all")]
public WotAccountTanksFullStatistics All { get; set; }
public WotAccountTanksFullStatistics? All { get; set; }
[JsonProperty("frags")]
public Dictionary<string, string> Frags { get; set; }
public Dictionary<string, string>? Frags { get; set; }
}
}
@@ -14,13 +14,13 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan Tag
///</summary>
[JsonProperty("tag")]
public string Tag { get; set; }
public string? Tag { get; set; }
///<summary>
/// Clan Name
///</summary>
[JsonProperty("name")]
public string Name { get; set; }
public string? Name { get; set; }
///<summary>
/// Clan created at. (UNIX Epoch time)
@@ -9,12 +9,12 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Clan roles list
/// </summary>
[JsonProperty("clans_roles")]
public Dictionary<string, string> ClanRoles { get; set; }
public Dictionary<string, string>? ClanRoles { get; set; }
/// <summary>
/// Clan settings list
/// </summary>
[JsonProperty("settings")]
public Dictionary<string, string> Settings { get; set; }
public Dictionary<string, string>? Settings { get; set; }
}
}
@@ -6,43 +6,43 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
public class WotEncyclopediaAchievementsResponse
{
[JsonProperty("achievement_id")]
public string AchievementId { get; set; }
public string? AchievementId { get; set; }
///<summary>
/// Achievement condition
///</summary>
[JsonProperty("condition")]
public string Condition { get; set; }
public string? Condition { get; set; }
///<summary>
/// Achievement description
///</summary>
[JsonProperty("description")]
public string Description { get; set; }
public string? Description { get; set; }
///<summary>
/// Historical info
///</summary>
[JsonProperty("hero_info")]
public string HeroInfo { get; set; }
public string? HeroInfo { get; set; }
///<summary>
/// Image link
///</summary>
[JsonProperty("image")]
public string Image { get; set; }
public string? Image { get; set; }
///<summary>
/// Image 180x180px link
///</summary>
[JsonProperty("image_big")]
public string ImageBig { get; set; }
public string? ImageBig { get; set; }
///<summary>
/// Achievement name
///</summary>
[JsonProperty("name")]
public string Name { get; set; }
public string? Name { get; set; }
///<summary>
/// Sort order
@@ -60,7 +60,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Achievement section
///</summary>
[JsonProperty("section")]
public string Section { get; set; }
public string? Section { get; set; }
///<summary>
/// Achievement section order
@@ -72,13 +72,13 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Achievement Type
///</summary>
[JsonProperty("type")]
public string Type { get; set; }
public string? Type { get; set; }
///<summary>
/// Achievement options
///</summary>
[JsonProperty("options")]
public WotEncyclopediaAchievementsOptions[] Options { get; set; }
public WotEncyclopediaAchievementsOptions[]? Options { get; set; }
}
public class WotEncyclopediaAchievementsOptions
@@ -88,21 +88,21 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Achievement description
///</summary>
[JsonProperty("description")]
public string Description { get; set; }
public string? Description { get; set; }
///<summary>
/// Image link
///</summary>
[JsonProperty("image")]
public string Image { get; set; }
public string? Image { get; set; }
///<summary>
/// Image 180x180px link
///</summary>
[JsonProperty("image_big")]
public string ImageBig { get; set; }
public string? ImageBig { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
public string? Name { get; set; }
}
}
@@ -10,13 +10,13 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Game client version
///</summary>
[JsonProperty("game_version")]
public string GameVersion { get; set; }
public string? GameVersion { get; set; }
///<summary>
/// List of supported languages
///</summary>
[JsonProperty("languages")]
public Dictionary<string, string> Languages { get; set; }
public Dictionary<string, string>? Languages { get; set; }
///<summary>
/// Encyclopedia last update time
@@ -28,25 +28,25 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Cru clan role
///</summary>
[JsonProperty("vehicle_crew_roles")]
public Dictionary<string, string> VehicleCrewRoles { get; set; }
public Dictionary<string, string>? VehicleCrewRoles { get; set; }
///<summary>
/// Vehicle nations dictionary
///</summary>
[JsonProperty("vehicle_nations")]
public Dictionary<string, string> VehicleNations { get; set; }
public Dictionary<string, string>? VehicleNations { get; set; }
///<summary>
/// Vehicle types dictionary
///</summary>
[JsonProperty("vehicle_types")]
public Dictionary<string, string> VehicleTypes { get; set; }
public Dictionary<string, string>? VehicleTypes { get; set; }
///<summary>
/// Achievements sections
///</summary>
[JsonProperty("achievement_sections")]
public Dictionary<string, WotEncyclopediaInfoAchievementSection> AchievementSections { get; set; }
public Dictionary<string, WotEncyclopediaInfoAchievementSection>? AchievementSections { get; set; }
}
@@ -57,7 +57,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Achievements section name
///</summary>
[JsonProperty("name")]
public string Name { get; set; }
public string? Name { get; set; }
///<summary>
/// Achievement section order
@@ -9,19 +9,19 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Vehicle description
///</summary>
[JsonProperty("description")]
public string Description { get; set; }
public string? Description { get; set; }
///<summary>
/// Engines id list
///</summary>
[JsonProperty("engines")]
public int[] Engines { get; set; }
public int[]? Engines { get; set; }
///<summary>
/// Guns id list
///</summary>
[JsonProperty("guns")]
public int[] Guns { get; set; }
public int[]? Guns { get; set; }
///<summary>
/// Is vehicle premium
@@ -33,13 +33,13 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Vehicle name
///</summary>
[JsonProperty("name")]
public string Name { get; set; }
public string? Name { get; set; }
///<summary>
/// Vehicle nationId
///</summary>
[JsonProperty("nation")]
public string Nation { get; set; }
public string? Nation { get; set; }
///<summary>
/// List of next vehicles in tree:
@@ -48,26 +48,26 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// value - amount of XP to open it
///</summary>
[JsonProperty("next_tanks")]
public Dictionary<string, string> NextTanks { get; set; }
public Dictionary<string, string>? NextTanks { get; set; }
///<summary>
/// Vehicle cost by pairs
/// with keys: price_credit, price_gold
///</summary>
[JsonProperty("cost")]
public Dictionary<string, string> Cost { get; set; }
public Dictionary<string, string>? Cost { get; set; }
///<summary>
/// Price in XP for parent vehicle as key
///</summary>
[JsonProperty("prices_xp")]
public Dictionary<string, string> PricesXp { get; set; }
public Dictionary<string, string>? PricesXp { get; set; }
///<summary>
/// List of compatible suspensions
///</summary>
[JsonProperty("suspensions")]
public int[] Suspensions { get; set; }
public int[]? Suspensions { get; set; }
///<summary>
/// VehicleId
@@ -85,13 +85,13 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// List of compatible turrets ids
///</summary>
[JsonProperty("turrets")]
public int[] Turrets { get; set; }
public int[]? Turrets { get; set; }
///<summary>
/// Vehicle type id
///</summary>
[JsonProperty("type")]
public string Type { get; set; }
public string? Type { get; set; }
/////<summary>
///// Default vehicle profile
@@ -104,7 +104,7 @@ namespace WotBlitzStatisticsPro.WgApiClient.Model
/// Keys: preview, normal
///</summary>
[JsonProperty("images")]
public Dictionary<string, string> Images { get; set; }
public Dictionary<string, string>? Images { get; set; }
/////<summary>
///// Information about investigated modules