-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
81 lines (67 loc) · 2.49 KB
/
Program.cs
File metadata and controls
81 lines (67 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using DesignPatterns.AbstractFactory;
using System;
namespace DesignPatterns
{
static class Program
{
private static void Main()
{
Console.WriteLine("Escolha a Operacao:");
Console.WriteLine("---------------------");
Console.WriteLine("Creational Patterns");
Console.WriteLine("---------------------");
Console.WriteLine("1 - Abstract Factory");
Console.WriteLine("2 - Method Factory");
Console.WriteLine("3 - Singleton");
Console.WriteLine("---------------------");
Console.WriteLine("Structural Patterns");
Console.WriteLine("---------------------");
Console.WriteLine("4 - Adapter");
Console.WriteLine("5 - Facade");
Console.WriteLine("---------------------");
Console.WriteLine("Behavioral Patterns");
Console.WriteLine("---------------------");
Console.WriteLine("6 - Command");
Console.WriteLine("7 - Strategy");
Console.WriteLine("8 - Observer");
Console.WriteLine("---------------------");
Console.WriteLine("9 - Exit");
var opcao = Console.ReadKey();
Console.WriteLine("\n---------------------\n");
switch (opcao.KeyChar)
{
case '1':
ExecucaoAbstractFactory.Executar();
break;
case '2':
//ExecucaoFactoryMethod.Executar();
break;
case '3':
//ExecucaoSingleton.Executar();
break;
case '4':
//ExecucaoAdapter.Executar();
break;
case '5':
//ExecucaoFacade.Executar();
break;
case '6':
//ExecucaoCommand.Executar();
break;
case '7':
//ExecucaoStrategy.Executar();
break;
case '8':
//ExecucaoObserver.Executar();
break;
case '9':
Environment.Exit(0);
break;
}
Console.WriteLine("Press any key to restart");
Console.ReadKey();
Console.Clear();
Main();
}
}
}