feat: add fnOS packaging, storage workflows and release pipeline
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using dy.net.model.dto;
|
||||
|
||||
namespace dy.net.storage
|
||||
{
|
||||
public class MediaStorageRouter
|
||||
{
|
||||
private readonly LocalMediaStorage _local;
|
||||
private readonly WebDavMediaStorage _webDav;
|
||||
private readonly OpenListMediaStorage _openList;
|
||||
|
||||
public MediaStorageRouter(LocalMediaStorage local, WebDavMediaStorage webDav, OpenListMediaStorage openList)
|
||||
{
|
||||
_local = local;
|
||||
_webDav = webDav;
|
||||
_openList = openList;
|
||||
}
|
||||
|
||||
public IMediaStorage Resolve(StorageType storageType) => storageType switch
|
||||
{
|
||||
StorageType.WebDav => _webDav,
|
||||
StorageType.OpenList => _openList,
|
||||
_ => _local
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user