mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
25 lines
605 B
C#
25 lines
605 B
C#
using System;
|
|
using System.IO;
|
|
using System.Threading.Tasks;
|
|
using Wabbajack.Common;
|
|
|
|
namespace Compression.BSA
|
|
{
|
|
public class MemoryStreamFactory : IStreamFactory
|
|
{
|
|
private readonly MemoryStream _data;
|
|
|
|
public MemoryStreamFactory(MemoryStream data)
|
|
{
|
|
_data = data;
|
|
}
|
|
public async ValueTask<Stream> GetStream()
|
|
{
|
|
return new MemoryStream(_data.GetBuffer(), 0, (int)_data.Length);
|
|
}
|
|
|
|
public DateTime LastModifiedUtc => DateTime.UtcNow;
|
|
public IPath Name => (RelativePath)"BSA Memory Stream";
|
|
}
|
|
}
|