-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
128 lines (97 loc) · 3.11 KB
/
Copy pathProgram.cs
File metadata and controls
128 lines (97 loc) · 3.11 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
using System;
namespace DesignPatternsUdemy
{
class MainClass
{
public static void Main(string[] args)
{
#region Builder
/// Fluent builder - inheritance through recursive generics
/// -------------------------------------------------------
//var me = Person.New
// .Called("dimitri")
// .WorksAs("police")
// .Build();
//Console.WriteLine(me);
/// Stepwise builder
/// ----------------
//var car = CarStepwiseBuilder.CarBuilder.Create()
// .OfType(CarStepwiseBuilder.CarType.Sedan)
// .WithWheels(5)
// .Build();
//Console.WriteLine(car);
///Builder exercise
///----------------
//new BuilderExercise();
#endregion
#region Factory
//Factory.FactoryDemo.FactoryMethod();
//Factory.AbstractFactoryDemo.Demo();
//var personFactory = new Factory.PersonFactory();
//personFactory.CreatePerson("Andy");
//personFactory.CreatePerson("Biden");
//personFactory.CreatePerson("Clara");
//personFactory.PrintFactory();
#endregion
#region Prototype
//Prototype.ExplicitDeepCopy.Demo();
//Prototype.PrototypeInheritance.Demo();
//Prototype.CopySerialization.Demo();
#endregion
#region Singleton
#endregion
#region Adapter
#endregion
#region Bridge
//Bridge.Exercise.Demo();
#endregion
#region Facade
#endregion
#region Flyweight
//Flyweight.Exercise.Demo();
#endregion
#region Decorator
//Decorator.Exercise.Demo();
#endregion
#region Proxy
#endregion
#region ChainOfResponsibility
//ChainOfResponsibility.Exercise.Demo();
#endregion
#region Command
//Command.Exercise.Demo();
#endregion
#region Interpretor
//Interpreter.Exercise.Demo();
#endregion
#region Iterator
//Iterator.Exercise.Demo();
#endregion
#region Mediator
//Mediator.Exercise.Demo();
#endregion
#region Memento
#endregion
#region Observer
// Events
// Weak Event Pattern
// Observer Interfaces
// Bidirectional
// Property Dependencies
// Container Wireup
#endregion
#region State
State.Exercise.Demo();
#endregion
#region Strategy
//Strategy.Exercise.Demo();
#endregion
#region TemplateMethod
//TemplateMethod.Exercise.Demo();
#endregion
#region Visitor
//Visitor.Exercise.Demo();
#endregion
}
}
}