From 89433ce1eb4952abe7be798e590acff6f9d025a2 Mon Sep 17 00:00:00 2001 From: eminencegrs Date: Fri, 2 Feb 2024 22:48:52 +0100 Subject: [PATCH] Add IPath, Directory and File. --- .../DataLakeStorage.cs | 14 ++++++++++++++ .../DesignPatterns.AbstractFactory/Directory.cs | 5 +++++ Creational/DesignPatterns.AbstractFactory/File.cs | 5 +++++ Creational/DesignPatterns.AbstractFactory/IPath.cs | 5 +++++ .../DesignPatterns.AbstractFactory/IStorage.cs | 10 ++-------- .../DesignPatterns.AbstractFactory/LocalStorage.cs | 14 ++++++++++++++ 6 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 Creational/DesignPatterns.AbstractFactory/DataLakeStorage.cs create mode 100644 Creational/DesignPatterns.AbstractFactory/Directory.cs create mode 100644 Creational/DesignPatterns.AbstractFactory/File.cs create mode 100644 Creational/DesignPatterns.AbstractFactory/IPath.cs create mode 100644 Creational/DesignPatterns.AbstractFactory/LocalStorage.cs diff --git a/Creational/DesignPatterns.AbstractFactory/DataLakeStorage.cs b/Creational/DesignPatterns.AbstractFactory/DataLakeStorage.cs new file mode 100644 index 0000000..3fb0974 --- /dev/null +++ b/Creational/DesignPatterns.AbstractFactory/DataLakeStorage.cs @@ -0,0 +1,14 @@ +namespace DesignPatterns.AbstractFactory; + +public class DataLakeStorage : IStorage +{ + public Task CreateDirectory(string name) + { + throw new NotImplementedException(); + } + + public Task CreateFile(string name) + { + throw new NotImplementedException(); + } +} diff --git a/Creational/DesignPatterns.AbstractFactory/Directory.cs b/Creational/DesignPatterns.AbstractFactory/Directory.cs new file mode 100644 index 0000000..e4bccd9 --- /dev/null +++ b/Creational/DesignPatterns.AbstractFactory/Directory.cs @@ -0,0 +1,5 @@ +namespace DesignPatterns.AbstractFactory; + +public class Directory : IPath +{ +} diff --git a/Creational/DesignPatterns.AbstractFactory/File.cs b/Creational/DesignPatterns.AbstractFactory/File.cs new file mode 100644 index 0000000..420794a --- /dev/null +++ b/Creational/DesignPatterns.AbstractFactory/File.cs @@ -0,0 +1,5 @@ +namespace DesignPatterns.AbstractFactory; + +public class File : IPath +{ +} diff --git a/Creational/DesignPatterns.AbstractFactory/IPath.cs b/Creational/DesignPatterns.AbstractFactory/IPath.cs new file mode 100644 index 0000000..654b013 --- /dev/null +++ b/Creational/DesignPatterns.AbstractFactory/IPath.cs @@ -0,0 +1,5 @@ +namespace DesignPatterns.AbstractFactory; + +public interface IPath +{ +} diff --git a/Creational/DesignPatterns.AbstractFactory/IStorage.cs b/Creational/DesignPatterns.AbstractFactory/IStorage.cs index c97cbf3..a9ca78b 100644 --- a/Creational/DesignPatterns.AbstractFactory/IStorage.cs +++ b/Creational/DesignPatterns.AbstractFactory/IStorage.cs @@ -2,12 +2,6 @@ namespace DesignPatterns.AbstractFactory; public interface IStorage { -} - -public class Disk : IStorage -{ -} - -public class DataLakeStorage : IStorage -{ + Task CreateDirectory(string name); + Task CreateFile(string name); } diff --git a/Creational/DesignPatterns.AbstractFactory/LocalStorage.cs b/Creational/DesignPatterns.AbstractFactory/LocalStorage.cs new file mode 100644 index 0000000..40671cd --- /dev/null +++ b/Creational/DesignPatterns.AbstractFactory/LocalStorage.cs @@ -0,0 +1,14 @@ +namespace DesignPatterns.AbstractFactory; + +public class LocalStorage : IStorage +{ + public Task CreateDirectory(string name) + { + throw new NotImplementedException(); + } + + public Task CreateFile(string name) + { + throw new NotImplementedException(); + } +}