mirror of
https://github.com/farcasclaudiu/design_pattens.git
synced 2026-06-28 21:01:25 +03:00
command notes
This commit is contained in:
@@ -60,6 +60,7 @@ namespace design_patterns.behavioral.command
|
|||||||
public void Execute()
|
public void Execute()
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Execute add order command for order {Order.ID}");
|
Console.WriteLine($"Execute add order command for order {Order.ID}");
|
||||||
|
// this should be set by a command processor externally
|
||||||
HasSucceded = true;
|
HasSucceded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,6 +81,7 @@ namespace design_patterns.behavioral.command
|
|||||||
public void Execute()
|
public void Execute()
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Execute remove order command for order {OrderID}");
|
Console.WriteLine($"Execute remove order command for order {OrderID}");
|
||||||
|
// this should be set by a command processor externally
|
||||||
// FORCE failure
|
// FORCE failure
|
||||||
HasSucceded = false;
|
HasSucceded = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user