Setup solution

This commit is contained in:
Geoffroy BONNEVILLE
2019-07-25 16:39:43 +02:00
parent 81509be167
commit 1b2007e6dd
136 changed files with 35834 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
using System.IO;
using Windows.Storage.Streams;
namespace ModernKeePassLibPCL.Utility
{
public static class StreamExtensions
{
public static Stream AsStream(this IRandomAccessStream inputStream)
{
var reader = new DataReader(inputStream.GetInputStreamAt(0));
var bytes = new byte[inputStream.Size];
reader.LoadAsync((uint)inputStream.Size).GetResults();
reader.ReadBytes(bytes);
return new MemoryStream(bytes);
}
}
}