Patching and extraction works, fewer failing tests

This commit is contained in:
Timothy Baldridge
2020-09-05 08:01:32 -06:00
parent 6602f1a895
commit a847d69851
27 changed files with 320 additions and 434 deletions

View File

@ -0,0 +1,32 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Wabbajack.Common;
namespace Wabbajack.VirtualFileSystem
{
public class UnmanagedStreamFactory : IStreamFactory
{
private readonly unsafe byte* _data;
private readonly long _size;
public unsafe UnmanagedStreamFactory(byte* data, long size)
{
_data = data;
_size = size;
}
public async ValueTask<Stream> GetStream()
{
unsafe
{
return new UnmanagedMemoryStream(_data, _size);
}
}
public DateTime LastModifiedUtc => DateTime.UtcNow;
public IPath Name => (RelativePath)"Unmanaged Memory Stream";
}
}