StreamExtensions
using System.Runtime.CompilerServices;
using Windows.Win32;
using Windows.Win32.Foundation;
using Windows.Win32.System.Com;
namespace System.IO
{
internal static class StreamExtensions
{
internal static ComScope<IStream> ToIStream([Nullable(1)] this Stream stream, bool makeSeekable = false)
{
ArgumentNullException.ThrowIfNull(stream, "stream");
return ComHelpers.GetComScope<IStream>(new ComManagedStream(stream, makeSeekable));
}
}
}