1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 23:27:34 +08:00
osu-lazer/osu.Game/Extensions/WebRequestExtensions.cs
「空白」 43450b5485 Resolve remaining InspectCode issues
> CI should now pass build test
2020-05-14 01:57:03 +09:00

31 lines
850 B
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.IO.Network;
using osu.Framework.Extensions.IEnumerableExtensions;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using JetBrains.Annotations;
namespace osu.Game.Extensions
{
public class Cursor
{
[UsedImplicitly]
[JsonExtensionData]
public IDictionary<string, JToken> Properties;
}
public static class WebRequestExtensions
{
public static void AddCursor(this WebRequest webRequest, Cursor cursor)
{
cursor?.Properties.ForEach(x =>
{
webRequest.AddParameter("cursor[" + x.Key + "]", x.Value.ToString());
});
}
}
}