├── BuilderPattern.sln ├── BuilderPattern.v12.suo ├── README.md ├── Solution1 ├── App.config ├── Pizza.cs ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── Solution1.csproj ├── bin │ └── Debug │ │ ├── Solution1.exe │ │ ├── Solution1.exe.config │ │ ├── Solution1.pdb │ │ ├── Solution1.vshost.exe │ │ ├── Solution1.vshost.exe.config │ │ └── Solution1.vshost.exe.manifest └── obj │ └── Debug │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── Solution1.csproj.FileListAbsolute.txt │ ├── Solution1.csprojResolveAssemblyReference.cache │ ├── Solution1.exe │ ├── Solution1.pdb │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs ├── Solution2 ├── App.config ├── Pizza.cs ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── Solution2.csproj ├── bin │ └── Debug │ │ ├── Solution2.exe │ │ ├── Solution2.exe.config │ │ ├── Solution2.pdb │ │ ├── Solution2.vshost.exe │ │ ├── Solution2.vshost.exe.config │ │ └── Solution2.vshost.exe.manifest └── obj │ └── Debug │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── Solution2.csproj.FileListAbsolute.txt │ ├── Solution2.csprojResolveAssemblyReference.cache │ ├── Solution2.exe │ ├── Solution2.pdb │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs ├── Solution3 ├── App.config ├── MyPizzaBuilder.cs ├── Pizza.cs ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── Solution3.csproj ├── bin │ └── Debug │ │ ├── Solution3.exe │ │ ├── Solution3.exe.config │ │ ├── Solution3.pdb │ │ ├── Solution3.vshost.exe │ │ ├── Solution3.vshost.exe.config │ │ └── Solution3.vshost.exe.manifest └── obj │ └── Debug │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── Solution3.csproj.FileListAbsolute.txt │ ├── Solution3.csprojResolveAssemblyReference.cache │ ├── Solution3.exe │ ├── Solution3.pdb │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs └── Solution4 ├── App.config ├── ClassDiagram1.cd ├── MyPizzaBuilder.cs ├── Pizza.cs ├── PizzaBuilder.cs ├── PizzaMaker.cs ├── Program.cs ├── Properties └── AssemblyInfo.cs ├── Solution4.csproj ├── TomatoPizzaBuilder.cs ├── bin └── Debug │ ├── Solution4.exe │ ├── Solution4.exe.config │ ├── Solution4.pdb │ ├── Solution4.vshost.exe │ ├── Solution4.vshost.exe.config │ └── Solution4.vshost.exe.manifest └── obj └── Debug ├── DesignTimeResolveAssemblyReferencesInput.cache ├── Solution4.csproj.FileListAbsolute.txt ├── Solution4.csprojResolveAssemblyReference.cache ├── Solution4.exe ├── Solution4.pdb ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs /BuilderPattern.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Solution1", "Solution1\Solution1.csproj", "{7954F21E-5B45-4F75-8265-63FCE3EE31F2}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Solution2", "Solution2\Solution2.csproj", "{E375552C-ACF3-41B5-BE8D-89D425066DA1}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Solution3", "Solution3\Solution3.csproj", "{93CAE4D3-9636-4DD8-907D-AC5986AD8AE9}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Solution4", "Solution4\Solution4.csproj", "{CADA9B7A-6899-4216-A15F-EB80DC63C5ED}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Release|Any CPU = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {7954F21E-5B45-4F75-8265-63FCE3EE31F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {7954F21E-5B45-4F75-8265-63FCE3EE31F2}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {7954F21E-5B45-4F75-8265-63FCE3EE31F2}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {7954F21E-5B45-4F75-8265-63FCE3EE31F2}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {E375552C-ACF3-41B5-BE8D-89D425066DA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {E375552C-ACF3-41B5-BE8D-89D425066DA1}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {E375552C-ACF3-41B5-BE8D-89D425066DA1}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {E375552C-ACF3-41B5-BE8D-89D425066DA1}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {93CAE4D3-9636-4DD8-907D-AC5986AD8AE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {93CAE4D3-9636-4DD8-907D-AC5986AD8AE9}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {93CAE4D3-9636-4DD8-907D-AC5986AD8AE9}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {93CAE4D3-9636-4DD8-907D-AC5986AD8AE9}.Release|Any CPU.Build.0 = Release|Any CPU 32 | {CADA9B7A-6899-4216-A15F-EB80DC63C5ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {CADA9B7A-6899-4216-A15F-EB80DC63C5ED}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {CADA9B7A-6899-4216-A15F-EB80DC63C5ED}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {CADA9B7A-6899-4216-A15F-EB80DC63C5ED}.Release|Any CPU.Build.0 = Release|Any CPU 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | EndGlobal 41 | -------------------------------------------------------------------------------- /BuilderPattern.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/BuilderPattern.v12.suo -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Builder-Design-Pattern 2 | Builder Design Pattern 3 | 4 | https://www.c-sharpcorner.com/UploadFile/db2972/builder-design-pattern-from-intent-to-implementation/ 5 | 6 | ![image](https://user-images.githubusercontent.com/38757471/134651312-52a7798f-7603-4521-a4cb-3364daa8fb54.png) 7 | 8 | -------------------------------------------------------------------------------- /Solution1/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution1/Pizza.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution1 8 | { 9 | public class Pizza 10 | { 11 | private readonly DoughType doughType; 12 | private readonly bool isRedPepper; 13 | private readonly Size size; 14 | private readonly CheeseType cheeseType; 15 | private readonly List vegetables; 16 | 17 | public Pizza(DoughType doughType, bool isRedPepper, Size size,CheeseType cheeseType,List vegetables) 18 | { 19 | this.doughType = doughType; 20 | this.isRedPepper = isRedPepper; 21 | this.size=size; 22 | this.cheeseType=cheeseType; 23 | this.vegetables=vegetables; 24 | } 25 | 26 | public void PizzaContent() 27 | { 28 | Console.WriteLine("Pizza with {0}", doughType); 29 | 30 | if (isRedPepper) 31 | Console.WriteLine("Red Pepper"); 32 | 33 | Console.WriteLine("Size: {0}", size); 34 | Console.WriteLine("Cheese Type: {0}", cheeseType); 35 | Console.WriteLine("Vegetables:"); 36 | 37 | foreach (var item in vegetables) 38 | { 39 | Console.WriteLine(" {0}", item); 40 | } 41 | } 42 | } 43 | public enum DoughType 44 | { 45 | Neapolitan_Pizza_Dough = 1, 46 | NewYorkStyle_Pizza_Dough = 2, 47 | SquarePan_Pizza_Dough = 3 48 | } 49 | 50 | public enum CheeseType 51 | { 52 | American = 1, 53 | Swiss = 2, 54 | } 55 | 56 | public enum Size 57 | { 58 | Small = 1, 59 | Medium = 2, 60 | Large = 3 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Solution1/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution1 8 | { 9 | class Program 10 | { 11 | static void Main(string[] args) 12 | { 13 | new Pizza(DoughType.Neapolitan_Pizza_Dough, true, Size.Medium, CheeseType.Swiss, new List { "Tomato", "Capsicum","Corn" }).PizzaContent(); 14 | Console.ReadKey(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Solution1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Solution1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Solution1")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2e2716f9-f392-45f8-8a56-1dd24d56809c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Solution1/Solution1.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {7954F21E-5B45-4F75-8265-63FCE3EE31F2} 8 | Exe 9 | Properties 10 | Solution1 11 | Solution1 12 | v4.5.1 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 60 | -------------------------------------------------------------------------------- /Solution1/bin/Debug/Solution1.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/bin/Debug/Solution1.exe -------------------------------------------------------------------------------- /Solution1/bin/Debug/Solution1.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution1/bin/Debug/Solution1.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/bin/Debug/Solution1.pdb -------------------------------------------------------------------------------- /Solution1/bin/Debug/Solution1.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/bin/Debug/Solution1.vshost.exe -------------------------------------------------------------------------------- /Solution1/bin/Debug/Solution1.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution1/bin/Debug/Solution1.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Solution1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Solution1/obj/Debug/Solution1.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Mansi\RND\DP\BuilderPattern\Solution1\bin\Debug\Solution1.exe.config 2 | F:\Mansi\RND\DP\BuilderPattern\Solution1\bin\Debug\Solution1.exe 3 | F:\Mansi\RND\DP\BuilderPattern\Solution1\bin\Debug\Solution1.pdb 4 | F:\Mansi\RND\DP\BuilderPattern\Solution1\obj\Debug\Solution1.exe 5 | F:\Mansi\RND\DP\BuilderPattern\Solution1\obj\Debug\Solution1.pdb 6 | F:\Mansi\RND\DP\BuilderPattern\Solution1\obj\Debug\Solution1.csprojResolveAssemblyReference.cache 7 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution1\bin\Debug\Solution1.exe.config 8 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution1\bin\Debug\Solution1.exe 9 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution1\bin\Debug\Solution1.pdb 10 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution1\obj\Debug\Solution1.csprojResolveAssemblyReference.cache 11 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution1\obj\Debug\Solution1.exe 12 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution1\obj\Debug\Solution1.pdb 13 | -------------------------------------------------------------------------------- /Solution1/obj/Debug/Solution1.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/obj/Debug/Solution1.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Solution1/obj/Debug/Solution1.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/obj/Debug/Solution1.exe -------------------------------------------------------------------------------- /Solution1/obj/Debug/Solution1.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/obj/Debug/Solution1.pdb -------------------------------------------------------------------------------- /Solution1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /Solution1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /Solution1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /Solution2/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution2/Pizza.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution2 8 | { 9 | public class Pizza 10 | { 11 | public DoughType doughType {get; set;} 12 | public bool isRedPepper { get; set; } 13 | public Size size { get; set; } 14 | public CheeseType cheeseType { get; set; } 15 | public List vegetables { get; set; } 16 | 17 | public void PizzaContent() 18 | { 19 | Console.WriteLine("Pizza with {0}", doughType); 20 | if (isRedPepper) 21 | Console.WriteLine("Red Pepper"); 22 | Console.WriteLine("Size: {0}", size); 23 | Console.WriteLine("Cheese Type: {0}", cheeseType); 24 | Console.WriteLine("Vegetables:"); 25 | foreach (var item in vegetables) 26 | { 27 | Console.WriteLine(" {0}", item); 28 | } 29 | } 30 | } 31 | public enum DoughType 32 | { 33 | Neapolitan_Pizza_Dough = 1, 34 | NewYorkStyle_Pizza_Dough = 2, 35 | SquarePan_Pizza_Dough = 3 36 | } 37 | 38 | public enum CheeseType 39 | { 40 | American = 1, 41 | Swiss = 2, 42 | } 43 | 44 | public enum Size 45 | { 46 | Small = 1, 47 | Medium = 2, 48 | Large = 3 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Solution2/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution2 8 | { 9 | class Program 10 | { 11 | static void Main(string[] args) 12 | { 13 | var pizza = new Pizza(); 14 | pizza.doughType = DoughType.Neapolitan_Pizza_Dough; 15 | pizza.isRedPepper = true; 16 | pizza.size = Size.Large; 17 | pizza.cheeseType = CheeseType.American; 18 | pizza.vegetables = new List { "Tomato", "Corn" }; 19 | 20 | pizza.PizzaContent(); 21 | 22 | Console.ReadKey(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Solution2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Solution2")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Solution2")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("689be91c-3069-4edf-bda3-423a38a54b13")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Solution2/Solution2.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E375552C-ACF3-41B5-BE8D-89D425066DA1} 8 | Exe 9 | Properties 10 | Solution2 11 | Solution2 12 | v4.5.1 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 60 | -------------------------------------------------------------------------------- /Solution2/bin/Debug/Solution2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/bin/Debug/Solution2.exe -------------------------------------------------------------------------------- /Solution2/bin/Debug/Solution2.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution2/bin/Debug/Solution2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/bin/Debug/Solution2.pdb -------------------------------------------------------------------------------- /Solution2/bin/Debug/Solution2.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/bin/Debug/Solution2.vshost.exe -------------------------------------------------------------------------------- /Solution2/bin/Debug/Solution2.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution2/bin/Debug/Solution2.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Solution2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Solution2/obj/Debug/Solution2.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Mansi\RND\DP\BuilderPattern\Solution2\bin\Debug\Solution2.exe.config 2 | F:\Mansi\RND\DP\BuilderPattern\Solution2\bin\Debug\Solution2.exe 3 | F:\Mansi\RND\DP\BuilderPattern\Solution2\bin\Debug\Solution2.pdb 4 | F:\Mansi\RND\DP\BuilderPattern\Solution2\obj\Debug\Solution2.csprojResolveAssemblyReference.cache 5 | F:\Mansi\RND\DP\BuilderPattern\Solution2\obj\Debug\Solution2.exe 6 | F:\Mansi\RND\DP\BuilderPattern\Solution2\obj\Debug\Solution2.pdb 7 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution2\bin\Debug\Solution2.exe.config 8 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution2\obj\Debug\Solution2.exe 9 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution2\obj\Debug\Solution2.pdb 10 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution2\bin\Debug\Solution2.exe 11 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution2\bin\Debug\Solution2.pdb 12 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution2\obj\Debug\Solution2.csprojResolveAssemblyReference.cache 13 | -------------------------------------------------------------------------------- /Solution2/obj/Debug/Solution2.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/obj/Debug/Solution2.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Solution2/obj/Debug/Solution2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/obj/Debug/Solution2.exe -------------------------------------------------------------------------------- /Solution2/obj/Debug/Solution2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/obj/Debug/Solution2.pdb -------------------------------------------------------------------------------- /Solution2/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /Solution2/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /Solution2/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution2/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /Solution3/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution3/MyPizzaBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution3 8 | { 9 | public class MyPizzaBuilder 10 | { 11 | Pizza pizza; 12 | 13 | public Pizza GetPizza() 14 | { 15 | return pizza; 16 | } 17 | 18 | public void CreatePizza() 19 | { 20 | pizza = new Pizza(); 21 | 22 | PrepareDough(); 23 | ApplyVegetables(); 24 | ApplyCheese(); 25 | AddCondiments(); 26 | } 27 | 28 | private void AddCondiments() 29 | { 30 | pizza.isRedPepper = true; 31 | } 32 | 33 | private void ApplyCheese() 34 | { 35 | pizza.cheeseType = CheeseType.American; 36 | } 37 | 38 | private void ApplyVegetables() 39 | { 40 | pizza.vegetables = new List { "Tomato", "Corn" }; 41 | } 42 | 43 | private void PrepareDough() 44 | { 45 | pizza.doughType = DoughType.Neapolitan_Pizza_Dough; 46 | pizza.size = Size.Large; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Solution3/Pizza.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution3 8 | { 9 | public class Pizza 10 | { 11 | public DoughType doughType {get; set;} 12 | public bool isRedPepper { get; set; } 13 | public Size size { get; set; } 14 | public CheeseType cheeseType { get; set; } 15 | public List vegetables { get; set; } 16 | 17 | public void PizzaContent() 18 | { 19 | Console.WriteLine("Pizza with {0}", doughType); 20 | if (isRedPepper) 21 | Console.WriteLine("Red Pepper"); 22 | Console.WriteLine("Size: {0}", size); 23 | Console.WriteLine("Cheese Type: {0}", cheeseType); 24 | Console.WriteLine("Vegetables:"); 25 | foreach (var item in vegetables) 26 | { 27 | Console.WriteLine(" {0}", item); 28 | } 29 | } 30 | } 31 | public enum DoughType 32 | { 33 | Neapolitan_Pizza_Dough = 1, 34 | NewYorkStyle_Pizza_Dough = 2, 35 | SquarePan_Pizza_Dough = 3 36 | } 37 | 38 | public enum CheeseType 39 | { 40 | American = 1, 41 | Swiss = 2, 42 | } 43 | 44 | public enum Size 45 | { 46 | Small = 1, 47 | Medium = 2, 48 | Large = 3 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Solution3/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution3 8 | { 9 | class Program 10 | { 11 | static void Main(string[] args) 12 | { 13 | var builder = new MyPizzaBuilder(); 14 | builder.CreatePizza(); 15 | var pizza = builder.GetPizza(); 16 | pizza.PizzaContent(); 17 | 18 | Console.ReadKey(); 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Solution3/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Solution3")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Solution3")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a3deb2fc-b71b-42b9-8ab7-3c53a7bc50dc")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Solution3/Solution3.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {93CAE4D3-9636-4DD8-907D-AC5986AD8AE9} 8 | Exe 9 | Properties 10 | Solution3 11 | Solution3 12 | v4.5.1 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 61 | -------------------------------------------------------------------------------- /Solution3/bin/Debug/Solution3.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/bin/Debug/Solution3.exe -------------------------------------------------------------------------------- /Solution3/bin/Debug/Solution3.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution3/bin/Debug/Solution3.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/bin/Debug/Solution3.pdb -------------------------------------------------------------------------------- /Solution3/bin/Debug/Solution3.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/bin/Debug/Solution3.vshost.exe -------------------------------------------------------------------------------- /Solution3/bin/Debug/Solution3.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution3/bin/Debug/Solution3.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Solution3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Solution3/obj/Debug/Solution3.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Mansi\RND\DP\BuilderPattern\Solution3\bin\Debug\Solution3.exe.config 2 | F:\Mansi\RND\DP\BuilderPattern\Solution3\obj\Debug\Solution3.csprojResolveAssemblyReference.cache 3 | F:\Mansi\RND\DP\BuilderPattern\Solution3\bin\Debug\Solution3.exe 4 | F:\Mansi\RND\DP\BuilderPattern\Solution3\bin\Debug\Solution3.pdb 5 | F:\Mansi\RND\DP\BuilderPattern\Solution3\obj\Debug\Solution3.exe 6 | F:\Mansi\RND\DP\BuilderPattern\Solution3\obj\Debug\Solution3.pdb 7 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution3\bin\Debug\Solution3.exe.config 8 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution3\obj\Debug\Solution3.exe 9 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution3\obj\Debug\Solution3.pdb 10 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution3\bin\Debug\Solution3.exe 11 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution3\bin\Debug\Solution3.pdb 12 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution3\obj\Debug\Solution3.csprojResolveAssemblyReference.cache 13 | -------------------------------------------------------------------------------- /Solution3/obj/Debug/Solution3.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/obj/Debug/Solution3.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Solution3/obj/Debug/Solution3.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/obj/Debug/Solution3.exe -------------------------------------------------------------------------------- /Solution3/obj/Debug/Solution3.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/obj/Debug/Solution3.pdb -------------------------------------------------------------------------------- /Solution3/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /Solution3/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /Solution3/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution3/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /Solution4/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution4/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | AAAAAAAAAAAAAAAAAAAAQAAAAAAAgABAAAAAAAEAAAA= 15 | MyPizzaBuilder.cs 16 | 17 | 18 | 19 | 20 | 21 | AAAAAAAAAEAAAAAAAIAAAAAIAAAAAAAAQgAAAIAAAAA= 22 | Pizza.cs 23 | 24 | 25 | 26 | 27 | 28 | AAAAAAACAAAAAAAAAAAAQAAAAAAAgABAAAABAAEAAQA= 29 | PizzaBuilder.cs 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | AAAAAAAAAAAAAAAAAAAAQAAAAAAAgABAAAAAAAEAAAA= 44 | TomatoPizzaBuilder.cs 45 | 46 | 47 | 48 | 49 | 50 | AAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAQA= 51 | PizzaMaker.cs 52 | 53 | 54 | 55 | 56 | 57 | AAAEAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAACAAA= 58 | Pizza.cs 59 | 60 | 61 | 62 | 63 | 64 | AAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA= 65 | Pizza.cs 66 | 67 | 68 | 69 | 70 | 71 | AAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAEAAA= 72 | Pizza.cs 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /Solution4/MyPizzaBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution4 8 | { 9 | public class MyPizzaBuilder : PizzaBuilder 10 | { 11 | public override void AddCondiments() 12 | { 13 | pizza.isRedPeeper = true; 14 | } 15 | 16 | public override void ApplyCheese() 17 | { 18 | pizza.cheeseType = CheeseType.American; 19 | } 20 | 21 | public override void ApplyVegetables() 22 | { 23 | pizza.vegetables = new List { "Tomato", "Corn" }; 24 | } 25 | 26 | public override void PrepareDough() 27 | { 28 | pizza.doughType = DoughType.Neapolitan_Pizza_Dough; 29 | pizza.size = Size.Large; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution4/Pizza.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution4 8 | { 9 | public class Pizza 10 | { 11 | public DoughType doughType {get; set;} 12 | public bool isRedPeeper { get; set; } 13 | public Size size { get; set; } 14 | public CheeseType cheeseType { get; set; } 15 | public List vegetables { get; set; } 16 | 17 | public void PizzaContent() 18 | { 19 | Console.WriteLine("Pizza with {0}", doughType); 20 | if (isRedPeeper) 21 | Console.WriteLine("Red Peeper"); 22 | Console.WriteLine("Size: {0}", size); 23 | Console.WriteLine("Cheese Type: {0}", cheeseType); 24 | Console.WriteLine("Vegetables:"); 25 | foreach (var item in vegetables) 26 | { 27 | Console.WriteLine(" {0}", item); 28 | } 29 | } 30 | } 31 | public enum DoughType 32 | { 33 | Neapolitan_Pizza_Dough = 1, 34 | NewYorkStyle_Pizza_Dough = 2, 35 | SquarePan_Pizza_Dough = 3 36 | } 37 | 38 | public enum CheeseType 39 | { 40 | American = 1, 41 | Swiss = 2, 42 | } 43 | 44 | public enum Size 45 | { 46 | Small = 1, 47 | Medium = 2, 48 | Large = 3 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Solution4/PizzaBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution4 8 | { 9 | public abstract class PizzaBuilder 10 | { 11 | protected Pizza pizza; 12 | 13 | public Pizza GetPizza() 14 | { 15 | return pizza; 16 | } 17 | 18 | public void CreateNewPizza() 19 | { 20 | pizza = new Pizza(); 21 | } 22 | 23 | public abstract void PrepareDough(); 24 | public abstract void ApplyVegetables(); 25 | public abstract void ApplyCheese(); 26 | public abstract void AddCondiments(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Solution4/PizzaMaker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution4 8 | { 9 | public class PizzaMaker 10 | { 11 | private readonly PizzaBuilder builder; 12 | 13 | public PizzaMaker(PizzaBuilder builder) 14 | { 15 | this.builder = builder; 16 | } 17 | 18 | public void BuildPizza() 19 | { 20 | builder.CreateNewPizza(); 21 | builder.PrepareDough(); 22 | builder.ApplyVegetables(); 23 | builder.ApplyCheese(); 24 | builder.AddCondiments(); 25 | } 26 | 27 | public Pizza GetPizza() 28 | { 29 | return builder.GetPizza(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution4/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution4 8 | { 9 | class Program 10 | { 11 | static void Main(string[] args) 12 | { 13 | var pizzaMaker = new PizzaMaker(new MyPizzaBuilder()); 14 | pizzaMaker.BuildPizza(); 15 | var pizza1 = pizzaMaker.GetPizza(); 16 | 17 | pizza1.PizzaContent(); 18 | 19 | pizzaMaker = new PizzaMaker(new TomatoPizzaBuilder()); 20 | pizzaMaker.BuildPizza(); 21 | var pizza2 = pizzaMaker.GetPizza(); 22 | 23 | pizza2.PizzaContent(); 24 | 25 | Console.ReadKey(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Solution4/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Solution4")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Solution4")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7ac693d1-110c-4177-9318-2626eeb6959e")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Solution4/Solution4.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {CADA9B7A-6899-4216-A15F-EB80DC63C5ED} 8 | Exe 9 | Properties 10 | Solution4 11 | Solution4 12 | v4.5.1 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 65 | -------------------------------------------------------------------------------- /Solution4/TomatoPizzaBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Solution4 8 | { 9 | public class TomatoPizzaBuilder : PizzaBuilder 10 | { 11 | public override void AddCondiments() 12 | { 13 | pizza.isRedPeeper = true; 14 | } 15 | 16 | public override void ApplyCheese() 17 | { 18 | pizza.cheeseType = CheeseType.Swiss; 19 | } 20 | 21 | public override void ApplyVegetables() 22 | { 23 | pizza.vegetables = new List { "Tomato" }; 24 | } 25 | 26 | public override void PrepareDough() 27 | { 28 | pizza.doughType = DoughType.Neapolitan_Pizza_Dough; 29 | pizza.size = Size.Large; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Solution4/bin/Debug/Solution4.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/bin/Debug/Solution4.exe -------------------------------------------------------------------------------- /Solution4/bin/Debug/Solution4.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution4/bin/Debug/Solution4.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/bin/Debug/Solution4.pdb -------------------------------------------------------------------------------- /Solution4/bin/Debug/Solution4.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/bin/Debug/Solution4.vshost.exe -------------------------------------------------------------------------------- /Solution4/bin/Debug/Solution4.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Solution4/bin/Debug/Solution4.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Solution4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Solution4/obj/Debug/Solution4.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Mansi\RND\DP\BuilderPattern\Solution4\bin\Debug\Solution4.exe.config 2 | F:\Mansi\RND\DP\BuilderPattern\Solution4\obj\Debug\Solution4.csprojResolveAssemblyReference.cache 3 | F:\Mansi\RND\DP\BuilderPattern\Solution4\bin\Debug\Solution4.exe 4 | F:\Mansi\RND\DP\BuilderPattern\Solution4\bin\Debug\Solution4.pdb 5 | F:\Mansi\RND\DP\BuilderPattern\Solution4\obj\Debug\Solution4.exe 6 | F:\Mansi\RND\DP\BuilderPattern\Solution4\obj\Debug\Solution4.pdb 7 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution4\bin\Debug\Solution4.exe.config 8 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution4\obj\Debug\Solution4.exe 9 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution4\obj\Debug\Solution4.pdb 10 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution4\bin\Debug\Solution4.exe 11 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution4\bin\Debug\Solution4.pdb 12 | F:\AKKI_DEV\RND\DP\BuilderPattern\Solution4\obj\Debug\Solution4.csprojResolveAssemblyReference.cache 13 | -------------------------------------------------------------------------------- /Solution4/obj/Debug/Solution4.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/obj/Debug/Solution4.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Solution4/obj/Debug/Solution4.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/obj/Debug/Solution4.exe -------------------------------------------------------------------------------- /Solution4/obj/Debug/Solution4.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/obj/Debug/Solution4.pdb -------------------------------------------------------------------------------- /Solution4/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /Solution4/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /Solution4/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshayblevel/Builder-Design-Pattern/57bafe59780d98d31106f0f5fec385f4131b1922/Solution4/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs --------------------------------------------------------------------------------