2021-08-07 07:26:09 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Teknik.Configuration;
|
|
|
|
|
|
2021-08-12 03:44:15 +02:00
|
|
|
|
namespace Teknik.StorageService
|
2021-08-07 07:26:09 +02:00
|
|
|
|
{
|
|
|
|
|
public static class StorageServiceFactory
|
|
|
|
|
{
|
|
|
|
|
public static StorageService GetStorageService(StorageConfig config)
|
|
|
|
|
{
|
|
|
|
|
switch (config.Type)
|
|
|
|
|
{
|
2021-08-07 08:21:24 +02:00
|
|
|
|
case StorageType.InMemory:
|
|
|
|
|
return new MemoryStorageService(config);
|
2021-08-07 07:26:09 +02:00
|
|
|
|
case StorageType.Local:
|
|
|
|
|
return new LocalStorageService(config);
|
|
|
|
|
case StorageType.S3:
|
|
|
|
|
default:
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|