Added ToString functions for most classes.

This commit is contained in:
mmuffins 2018-07-04 22:26:07 +02:00
parent 914f913849
commit c7ce597007
14 changed files with 36 additions and 16 deletions

View File

@ -16,5 +16,7 @@ namespace SteamStorefrontAPI.Classes
[JsonProperty("description")]
public string Description { get; set; }
public override string ToString() => Description;
}
}

View File

@ -16,5 +16,7 @@ namespace SteamStorefrontAPI.Classes
[JsonProperty("path")]
public string Path { get; set; }
public override string ToString() => Name;
}
}

View File

@ -30,6 +30,8 @@ namespace SteamStorefrontAPI.Classes
{
this.Webm = new Dictionary<string, string>();
}
public override string ToString() => Name;
}
}

View File

@ -13,5 +13,7 @@ namespace SteamStorefrontAPI.Classes
{
[JsonProperty("total")]
public long Total { get; set; }
public override string ToString() => Total.ToString();
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -16,6 +16,8 @@ namespace SteamStorefrontAPI.Classes
[JsonProperty("description")]
public string Description { get; set; }
public override string ToString() => Description;
}
}

View File

@ -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));
}
}
}

View File

@ -62,5 +62,7 @@ namespace SteamStorefrontAPI.Classes
^ this.Initial.GetHashCode()
^ this.Currency.GetHashCode();
}
public override string ToString() => Final.ToString() + " " + Currency;
}
}

View File

@ -16,5 +16,7 @@ namespace SteamStorefrontAPI.Classes
[JsonProperty("date")]
public string Date { get; set; }
public override string ToString() => string.IsNullOrWhiteSpace(Date) ? "Coming Soon" : Date;
}
}

View File

@ -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;
}
}

View File

@ -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();
}
}

View File

@ -44,5 +44,10 @@ namespace SteamStorefrontAPI.Classes
{
return this.Id.GetHashCode();
}
public override string ToString()
{
return Name;
}
}
}

View File

@ -60,5 +60,7 @@ namespace SteamStorefrontAPI.Classes
return JsonConvert.DeserializeObject<SteamApp>(json, serializerSettings);
}
public override string ToString() => Name;
}
}