ToData now supports multiple formats.

Introduce `ProgrartC` to build a single image to work with other build tools.
Added a `CombinedStorageProvider` to allow aggregate storage providers.
This commit is contained in:
Creeper Lv
2026-01-16 00:36:38 +11:00
parent e4e868a393
commit dce1ff2518
9 changed files with 261 additions and 17 deletions

View File

@@ -0,0 +1,26 @@
namespace Progrart.Core.Storage
{
public class CombinedStorageProvider : IStorageProvider
{
public List<IStorageProvider> providers = new List<IStorageProvider>();
public async Task<Stream?> TryOpenRead(string path)
{
foreach (var item in providers)
{
var v = await item.TryOpenRead(path);
if (v != null) return v;
}
return null;
}
public async Task<Stream?> TryOpenWrite(string path)
{
foreach (var item in providers)
{
var v = await item.TryOpenWrite(path);
if (v != null) return v;
}
return null;
}
}
}