mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 21:56:34 +00:00
15 lines
363 B
C#
15 lines
363 B
C#
using System.Text;
|
|
|
|
namespace Azaion.Common.Extensions;
|
|
|
|
public static class StreamExtensions
|
|
{
|
|
public static string ConvertToString(this Stream stream)
|
|
{
|
|
stream.Position = 0;
|
|
using var reader = new StreamReader(stream, Encoding.UTF8);
|
|
var result = reader.ReadToEnd();
|
|
stream.Position = 0;
|
|
return result;
|
|
}
|
|
} |