Added ToString functions for most classes.
This commit is contained in:
parent
914f913849
commit
c7ce597007
@ -16,5 +16,7 @@ namespace SteamStorefrontAPI.Classes
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
public override string ToString() => Description;
|
||||
}
|
||||
}
|
||||
|
@ -16,5 +16,7 @@ namespace SteamStorefrontAPI.Classes
|
||||
|
||||
[JsonProperty("path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ namespace SteamStorefrontAPI.Classes
|
||||
{
|
||||
this.Webm = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,5 +13,7 @@ namespace SteamStorefrontAPI.Classes
|
||||
{
|
||||
[JsonProperty("total")]
|
||||
public long Total { get; set; }
|
||||
|
||||
public override string ToString() => Total.ToString();
|
||||
}
|
||||
}
|
||||
|
@ -166,9 +166,8 @@ namespace SteamStorefrontAPI.Classes
|
||||
return Equals(personObj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.SteamAppId.GetHashCode();
|
||||
}
|
||||
public override int GetHashCode() => this.SteamAppId.GetHashCode();
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
}
|
||||
|
@ -97,9 +97,8 @@ namespace SteamStorefrontAPI.Classes
|
||||
return Equals(personObj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.Id.GetHashCode();
|
||||
}
|
||||
public override int GetHashCode() => this.Id.GetHashCode();
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,8 @@ namespace SteamStorefrontAPI.Classes
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
public override string ToString() => Description;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,6 +19,11 @@ namespace SteamStorefrontAPI.Classes
|
||||
|
||||
[JsonProperty("linux")]
|
||||
public bool Linux { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Join(",", (Windows ? "Windows" : null), (Linux ? "Linux" : null), (Mac ? "Mac" : null));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -62,5 +62,7 @@ namespace SteamStorefrontAPI.Classes
|
||||
^ this.Initial.GetHashCode()
|
||||
^ this.Currency.GetHashCode();
|
||||
}
|
||||
|
||||
public override string ToString() => Final.ToString() + " " + Currency;
|
||||
}
|
||||
}
|
||||
|
@ -16,5 +16,7 @@ namespace SteamStorefrontAPI.Classes
|
||||
|
||||
[JsonProperty("date")]
|
||||
public string Date { get; set; }
|
||||
|
||||
public override string ToString() => string.IsNullOrWhiteSpace(Date) ? "Coming Soon" : Date;
|
||||
}
|
||||
}
|
||||
|
@ -71,9 +71,8 @@ namespace SteamStorefrontAPI.Classes
|
||||
return Equals(personObj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.Id.GetHashCode();
|
||||
}
|
||||
public override int GetHashCode() => this.Id.GetHashCode();
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
}
|
||||
|
@ -14,9 +14,6 @@ namespace SteamStorefrontAPI.Classes
|
||||
[JsonProperty("full_gamepad")]
|
||||
public bool FullGamepad { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return FullGamepad.ToString();
|
||||
}
|
||||
public override string ToString() => FullGamepad.ToString();
|
||||
}
|
||||
}
|
||||
|
@ -44,5 +44,10 @@ namespace SteamStorefrontAPI.Classes
|
||||
{
|
||||
return this.Id.GetHashCode();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,5 +60,7 @@ namespace SteamStorefrontAPI.Classes
|
||||
|
||||
return JsonConvert.DeserializeObject<SteamApp>(json, serializerSettings);
|
||||
}
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user