The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StorageServiceFactory.cs 692B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Teknik.Configuration;
  7. namespace StorageService
  8. {
  9. public static class StorageServiceFactory
  10. {
  11. public static StorageService GetStorageService(StorageConfig config)
  12. {
  13. switch (config.Type)
  14. {
  15. case StorageType.InMemory:
  16. return new MemoryStorageService(config);
  17. case StorageType.Local:
  18. return new LocalStorageService(config);
  19. case StorageType.S3:
  20. default:
  21. return null;
  22. }
  23. }
  24. }
  25. }