Downgrade to net standard 1.2

This commit is contained in:
Geoffroy BONNEVILLE
2020-03-23 18:35:00 +01:00
parent b8240d482f
commit 5067f81189
60 changed files with 1250 additions and 285 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);
}
}
}