mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-21 16:09:19 +01:00
cleanup: remove obsolete Util.HttpClient, Util.CopyTo()
This commit is contained in:
parent
292e0c2df8
commit
8bd0cb0c57
1 changed files with 0 additions and 22 deletions
|
|
@ -35,13 +35,6 @@ public static class Util
|
||||||
private static ulong moduleStartAddr;
|
private static ulong moduleStartAddr;
|
||||||
private static ulong moduleEndAddr;
|
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>
|
/// <summary>
|
||||||
/// Gets the assembly version of Dalamud.
|
/// Gets the assembly version of Dalamud.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -493,21 +486,6 @@ public static class Util
|
||||||
return Encoding.UTF8.GetString(mso.ToArray());
|
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>
|
/// <summary>
|
||||||
/// Heuristically determine if Dalamud is running on Linux/WINE.
|
/// Heuristically determine if Dalamud is running on Linux/WINE.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue