Skip to content
Browse files

Made a lot of public fields read-only (which they should have been in…

… the first place...)
  • Loading branch information...
1 parent 0c70284 commit 249ddf3c99dc3486a40390637844f8bc573521af @epicvrvs committed Apr 14, 2012
View
14 LibOfLegends/AuthResponse.cs
@@ -6,12 +6,12 @@
/// additional fields.
/// </summary>
public class AuthResponse
- {
- public int Rate { get; set; }
- public string Token { get; set; }
- public string Reason { get; set; }
- public string Status { get; set; }
- public int Delay { get; set; }
- public string User { get; set; }
+ {
+ public int Rate;
+ public string Token;
+ public string Reason;
+ public string Status;
+ public int Delay;
+ public string User;
}
}
View
41 LibOfLegends/ChampionStatistics.cs
@@ -8,36 +8,37 @@ namespace LibOfLegends
{
public class ChampionStatistics
{
- public int Wins;
- public int Losses;
+ public readonly int Wins;
+ public readonly int Losses;
- public int Kills;
- public int Deaths;
- public int Assists;
+ public readonly int Kills;
+ public readonly int Deaths;
+ public readonly int Assists;
- public int MinionKills;
+ public readonly int MinionKills;
- public int Gold;
+ public readonly int Gold;
- public int TurretsDestroyed;
+ public readonly int TurretsDestroyed;
- public int DamageDealt;
- public int PhysicalDamageDealt;
- public int MagicalDamageDealt;
+ public readonly int DamageDealt;
+ public readonly int PhysicalDamageDealt;
+ public readonly int MagicalDamageDealt;
- public int DamageTaken;
+ public readonly int DamageTaken;
- public int DoubleKills;
- public int TripleKills;
- public int QuadraKills;
- public int PentaKills;
+ public readonly int DoubleKills;
+ public readonly int TripleKills;
+ public readonly int QuadraKills;
+ public readonly int PentaKills;
- public int TimeSpentDead;
+ public readonly int TimeSpentDead;
- public int MaximumKills;
- public int MaximumDeaths;
+ public readonly int MaximumKills;
+ public readonly int MaximumDeaths;
+
+ public readonly int ChampionId;
- public int ChampionId;
AggregatedStats Statistics;
//Must be set by user
View
10 LibOfLegends/ConnectionProfile.cs
@@ -2,12 +2,12 @@
{
public class ConnectionProfile
{
- public AuthenticationProfile Authentication;
- public ProxyProfile Proxy;
- public RegionProfile Region;
+ public readonly AuthenticationProfile Authentication;
+ public readonly ProxyProfile Proxy;
+ public readonly RegionProfile Region;
- public string User;
- public string Password;
+ public readonly string User;
+ public readonly string Password;
public ConnectionProfile(AuthenticationProfile authentication, RegionProfile region, ProxyProfile proxy, string user, string password)
{
View
62 LibOfLegends/GameResult.cs
@@ -8,56 +8,56 @@ namespace LibOfLegends
{
public class GameResult
{
- public bool Win;
+ public readonly bool Win;
- public int Level;
+ public readonly int Level;
- public int Kills;
- public int Deaths;
- public int Assists;
+ public readonly int Kills;
+ public readonly int Deaths;
+ public readonly int Assists;
- public int GoldEarned;
+ public readonly int GoldEarned;
- public int MinionsKilled;
+ public readonly int MinionsKilled;
- public int[] Items;
+ public readonly int[] Items;
- public int TotalDamageDealt;
- public int PhysicalDamageDealt;
- public int MagicalDamageDealt;
+ public readonly int TotalDamageDealt;
+ public readonly int PhysicalDamageDealt;
+ public readonly int MagicalDamageDealt;
- public int TotalDamageTaken;
- public int PhysicalDamageTaken;
- public int MagicalDamageTaken;
+ public readonly int TotalDamageTaken;
+ public readonly int PhysicalDamageTaken;
+ public readonly int MagicalDamageTaken;
- public int TotalHealingDone;
+ public readonly int TotalHealingDone;
- public int LargestCriticalStrike;
- public int LargestMultiKill;
- public int LargestKillingSpree;
+ public readonly int LargestCriticalStrike;
+ public readonly int LargestMultiKill;
+ public readonly int LargestKillingSpree;
- public int TimeSpentDead;
+ public readonly int TimeSpentDead;
//Summoner's Rift and Twisted Treeline specific
- public int? TurretsDestroyed;
- public int? InhibitorsDestroyed;
- public int? NeutralMinionsKilled;
+ public readonly int? TurretsDestroyed;
+ public readonly int? InhibitorsDestroyed;
+ public readonly int? NeutralMinionsKilled;
//Dominion specific
- public int? NodesNeutralised;
- public int? NodeNeutralisationAssists;
- public int? NodesCaptured;
+ public readonly int? NodesNeutralised;
+ public readonly int? NodeNeutralisationAssists;
+ public readonly int? NodesCaptured;
- public int? VictoryPoints;
- public int? Objectives;
+ public readonly int? VictoryPoints;
+ public readonly int? Objectives;
- public int? TotalScore;
- public int? ObjectiveScore;
- public int? CombatScore;
+ public readonly int? TotalScore;
+ public readonly int? ObjectiveScore;
+ public readonly int? CombatScore;
- public int? Rank;
+ public readonly int? Rank;
List<RawStat> Statistics;
bool IsDominion;
View
8 LibOfLegends/RPCConnectResult.cs
@@ -16,10 +16,10 @@ public enum RPCConnectResultType
public class RPCConnectResult
{
- public RPCConnectResultType Result;
- public Exception ConnectionError;
- public string FlexErrorMessage;
- public Fault FlexLoginFault;
+ public readonly RPCConnectResultType Result;
+ public readonly Exception ConnectionError;
+ public readonly string FlexErrorMessage;
+ public readonly Fault FlexLoginFault;
public RPCConnectResult(Exception exception)
{

0 comments on commit 249ddf3

Please sign in to comment.
Something went wrong with that request. Please try again.