We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7431be commit 5787fdbCopy full SHA for 5787fdb
Command/Client/Program.cs
@@ -9,6 +9,20 @@ class Program
9
{
10
static void Main(string[] args)
11
12
+
13
+ /*
14
+ More info: https://en.wikipedia.org/wiki/Command_pattern
15
+ What problems can the Command design pattern solve?
16
17
+ Coupling the invoker of a request to a particular request should be avoided.
18
+ That is, hard-wired requests should be avoided.
19
+ It should be possible to configure an object (that invokes a request) with a request.
20
21
+ Implementing (hard-wiring) a request directly into a class is inflexible because
22
+ it couples the class to a particular request at compile-time,
23
+ which makes it impossible to specify a request at run-time.
24
+ */
25
26
string argument = Console.ReadLine();
27
28
ISwitchable lamp = new Light();
0 commit comments