Skip to content

Commit

Permalink
Add AbstractFactory (draft).
Browse files Browse the repository at this point in the history
  • Loading branch information
eminencegrs committed Feb 2, 2024
1 parent c9c1c2d commit f44e167
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<RootNamespace>DesignPatterns.Visitor</RootNamespace>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>DesignPatterns.AbstractFactory</RootNamespace>
</PropertyGroup>

</Project>
13 changes: 13 additions & 0 deletions Creational/DesignPatterns.AbstractFactory/IStorage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace DesignPatterns.AbstractFactory;

public interface IStorage
{
}

public class Disk : IStorage
{
}

public class DataLakeStorage : IStorage
{
}
13 changes: 13 additions & 0 deletions Creational/DesignPatterns.AbstractFactory/IStorageFactory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace DesignPatterns.AbstractFactory;

public interface IStorageFactory
{
}

public class LocalStorageFactory : IStorageFactory
{
}

public class AzureStorageFactory : IStorageFactory
{
}
3 changes: 3 additions & 0 deletions Creational/DesignPatterns.AbstractFactory/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// See https://aka.ms/new-console-template for more information

Console.WriteLine("Hello, World!");
9 changes: 9 additions & 0 deletions DesignPatterns.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Behavioral", "Behavioral",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesignPatterns.Visitor.UnitTests", "Behavioral\DesignPatterns.Visitor.UnitTests\DesignPatterns.Visitor.UnitTests.csproj", "{02AA0F74-2EFE-4804-8938-A92542860F74}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Creational", "Creational", "{AE005ED4-5F0B-4AF9-81AE-AAE3AD6F8901}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesignPatterns.AbstractFactory", "Creational\DesignPatterns.AbstractFactory\DesignPatterns.AbstractFactory.csproj", "{0C5CFC73-F6E4-4796-A11C-9CA378B80517}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -20,9 +24,14 @@ Global
{02AA0F74-2EFE-4804-8938-A92542860F74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02AA0F74-2EFE-4804-8938-A92542860F74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02AA0F74-2EFE-4804-8938-A92542860F74}.Release|Any CPU.Build.0 = Release|Any CPU
{0C5CFC73-F6E4-4796-A11C-9CA378B80517}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C5CFC73-F6E4-4796-A11C-9CA378B80517}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C5CFC73-F6E4-4796-A11C-9CA378B80517}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C5CFC73-F6E4-4796-A11C-9CA378B80517}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{DCE06EB6-BAB5-4573-AF67-128DBCCDB90C} = {7FF0E83F-EBEB-4103-BCD1-2F100E82FCD1}
{02AA0F74-2EFE-4804-8938-A92542860F74} = {7FF0E83F-EBEB-4103-BCD1-2F100E82FCD1}
{0C5CFC73-F6E4-4796-A11C-9CA378B80517} = {AE005ED4-5F0B-4AF9-81AE-AAE3AD6F8901}
EndGlobalSection
EndGlobal

0 comments on commit f44e167

Please sign in to comment.