diff --git a/FileRepository/Factory.cs b/FileRepository/Factory.cs index 6a47560..2d5d4f5 100644 --- a/FileRepository/Factory.cs +++ b/FileRepository/Factory.cs @@ -47,11 +47,26 @@ namespace FileRepository /// Returns an initialised repository. public IFileRepository GetFileRepository(RepositoryType repositoryType) { - throw new NotImplementedException("This section won't work until another method is set up with at least one repository type."); + switch (repositoryType) + { + //case RepositoryType.Disk: + // return new DiskRepo() { }; - //IFileRepository fileRepository = // Here we need to get the specific class of repository based on the RepositoryType enum. + //case RepositoryType.MongoDb: + // break; - //return fileRepository; + //case RepositoryType.S3: + // break; + + //case RepositoryType.Sftp: + // break; + + //case RepositoryType.Sql: + // break; + + default: + throw new ArgumentException($"{Enum.GetName(typeof(RepositoryType), value: repositoryType)} is not a valid repository type."); + } } } }