cleanup: remove obsolete Util.HttpClient, Util.CopyTo()

This commit is contained in:
Ava Chaney 2023-05-27 17:37:41 -07:00
parent 292e0c2df8
commit 8bd0cb0c57

View file

@ -35,13 +35,6 @@ public static class Util
private static ulong moduleStartAddr;
private static ulong moduleEndAddr;
/// <summary>
/// Gets an httpclient for usage.
/// Do NOT await this.
/// </summary>
[Obsolete($"Use Service<{nameof(HappyHttpClient)}> instead.")]
public static HttpClient HttpClient { get; } = Service<HappyHttpClient>.Get().SharedHttpClient;
/// <summary>
/// Gets the assembly version of Dalamud.
/// </summary>
@ -493,21 +486,6 @@ public static class Util
return Encoding.UTF8.GetString(mso.ToArray());
}
/// <summary>
/// Copy one stream to another.
/// </summary>
/// <param name="src">The source stream.</param>
/// <param name="dest">The destination stream.</param>
/// <param name="len">The maximum length to copy.</param>
[Obsolete("Use Stream.CopyTo() instead", true)]
public static void CopyTo(Stream src, Stream dest, int len = 4069)
{
var bytes = new byte[len];
int cnt;
while ((cnt = src.Read(bytes, 0, bytes.Length)) != 0) dest.Write(bytes, 0, cnt);
}
/// <summary>
/// Heuristically determine if Dalamud is running on Linux/WINE.
/// </summary>