1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Use char instead of sting for request parameter creation

This commit is contained in:
Andrei Zavatski 2020-10-27 23:57:11 +03:00
parent 008d1d697c
commit c4efceceb2
2 changed files with 4 additions and 4 deletions

View File

@ -61,8 +61,8 @@ namespace osu.Game.Tests.Visual.UserInterface
control.Category.BindValueChanged(c => category.Text = $"Category: {c.NewValue}", true);
control.Genre.BindValueChanged(g => genre.Text = $"Genre: {g.NewValue}", true);
control.Language.BindValueChanged(l => language.Text = $"Language: {l.NewValue}", true);
control.Extra.BindValueChanged(e => extra.Text = $"Extra: {(e.NewValue == null ? "" : string.Join(".", e.NewValue.Select(i => i.ToString().ToLowerInvariant())))}", true);
control.Ranks.BindValueChanged(r => ranks.Text = $"Ranks: {(r.NewValue == null ? "" : string.Join(".", r.NewValue.Select(i => i.ToString())))}", true);
control.Extra.BindValueChanged(e => extra.Text = $"Extra: {(e.NewValue == null ? "" : string.Join('.', e.NewValue.Select(i => i.ToString().ToLowerInvariant())))}", true);
control.Ranks.BindValueChanged(r => ranks.Text = $"Ranks: {(r.NewValue == null ? "" : string.Join('.', r.NewValue.Select(i => i.ToString())))}", true);
control.Played.BindValueChanged(p => played.Text = $"Played: {p.NewValue}", true);
}

View File

@ -81,10 +81,10 @@ namespace osu.Game.Online.API.Requests
req.AddParameter("sort", $"{SortCriteria.ToString().ToLowerInvariant()}_{directionString}");
if (Extra != null && Extra.Any())
req.AddParameter("e", string.Join(".", Extra.Select(e => e.ToString().ToLowerInvariant())));
req.AddParameter("e", string.Join('.', Extra.Select(e => e.ToString().ToLowerInvariant())));
if (Ranks != null && Ranks.Any())
req.AddParameter("r", string.Join(".", Ranks.Select(r => r.ToString())));
req.AddParameter("r", string.Join('.', Ranks.Select(r => r.ToString())));
if (Played != SearchPlayed.Any)
req.AddParameter("played", Played.ToString().ToLowerInvariant());