Skip to content

Commit e609075

Browse files
Merge pull request #63 from vivopensource/dev
Merges Dev to Main
2 parents 269bf25 + e96a81d commit e609075

File tree

86 files changed

+185
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+185
-391
lines changed

.github/workflows/dotnet-desktop.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ jobs:
5050

5151
strategy:
5252
matrix:
53-
configuration: [Release]
53+
configuration: [Debug]
5454

5555
runs-on: windows-latest # For a list of available runner types, refer to
5656
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
5757

5858
env:
59-
Solution_Name: GofPatterns.sln # Replace with your solution name, i.e. MyWpfApp.sln.
60-
Test_Project_Path: GofPatternsTests\GofPatternsTests.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
59+
Solution_Name: GofPatterns.sln
60+
Test_Project_Path: GofPatternsTests\GofPatternsTests.csproj
6161

6262

6363
steps:
@@ -75,6 +75,10 @@ jobs:
7575
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
7676
- name: Setup MSBuild.exe
7777
uses: microsoft/setup-msbuild@v1.0.2
78+
79+
# Execute build
80+
- name: Execute build
81+
run: dotnet build
7882

7983
# Execute all unit tests in the solution
8084
- name: Execute unit tests
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
using Core.Console.Interfaces;
22
using GofPatterns.Behavioral.CommandPattern;
3-
using GofPatterns.Behavioral.CommandPattern.Interfaces.Invokers;
43

54
namespace GofConsoleApp.Examples.Behavioral.CommandPattern.OnlineShopComponents;
65

76
internal class OnlineShopAsInvoker
87
{
98
private readonly IConsoleLogger logger;
10-
private readonly ICommandUndoInvoker<TransactionCommand, ProductRequest> commandUndoInvoker;
9+
private readonly ICommandInvokerUndo<TransactionCommand, ProductRequest> commandInvokerUndo;
1110

1211
public OnlineShopAsInvoker(IConsoleLogger logger)
1312
{
1413
this.logger = logger;
15-
commandUndoInvoker = new CommandUndoInvoker<TransactionCommand, ProductRequest>();
14+
commandInvokerUndo = new CommandInvokerUndo<TransactionCommand, ProductRequest>();
1615
}
1716

1817
public void PurchaseProduct(string productName)
1918
{
2019
var productRequest = new ProductRequest(logger, productName); // Request
2120
var transactionCommand = new TransactionCommand(productRequest); // Command
22-
commandUndoInvoker.AddCommand(transactionCommand, false);
21+
commandInvokerUndo.AddCommand(transactionCommand, false);
2322
}
2423

2524
public void ReturnProduct(string productName)
2625
{
2726
var productRequest = new ProductRequest(logger, productName); // Request
2827
var transactionCommand = new TransactionCommand(productRequest); // Command
29-
commandUndoInvoker.AddCommand(transactionCommand, true);
28+
commandInvokerUndo.AddCommand(transactionCommand, true);
3029
}
3130

32-
public int CheckOut() => commandUndoInvoker.ExecuteCommands();
31+
public int CheckOut() => commandInvokerUndo.ExecuteCommands();
3332
}

GofConsoleApp/Examples/Behavioral/CommandPattern/OnlineShopComponents/ProductRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Core.Console.Interfaces;
2-
using GofPatterns.Behavioral.CommandPattern.Interfaces;
2+
using GofPatterns.Behavioral.CommandPattern;
33

44
namespace GofConsoleApp.Examples.Behavioral.CommandPattern.OnlineShopComponents;
55

GofConsoleApp/Examples/Behavioral/CommandPattern/OnlineShopComponents/TransactionCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace GofConsoleApp.Examples.Behavioral.CommandPattern.OnlineShopComponents;
44

5-
internal class TransactionCommand : AbstractCommandUndo<ProductRequest>
5+
internal class TransactionCommand : CommandUndo<ProductRequest>
66
{
77
public TransactionCommand(ProductRequest productRequest)
88
{

GofConsoleApp/Examples/Behavioral/CommandPattern/RestaurantComponents/Commands/DeliverFoodCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace GofConsoleApp.Examples.Behavioral.CommandPattern.RestaurantComponents.Commands;
55

6-
internal class DeliverFoodCommand : AbstractCommand<IFoodRequest>, IFoodCommand
6+
internal class DeliverFoodCommand : Command<IFoodRequest>, IFoodCommand
77
{
88
public override void Execute()
99
{

GofConsoleApp/Examples/Behavioral/CommandPattern/RestaurantComponents/Commands/IFoodCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using GofConsoleApp.Examples.Behavioral.CommandPattern.RestaurantComponents.Requests;
2-
using GofPatterns.Behavioral.CommandPattern.Interfaces.Commands;
2+
using GofPatterns.Behavioral.CommandPattern;
33

44
namespace GofConsoleApp.Examples.Behavioral.CommandPattern.RestaurantComponents.Commands;
55

GofConsoleApp/Examples/Behavioral/CommandPattern/RestaurantComponents/Commands/ServeFoodCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace GofConsoleApp.Examples.Behavioral.CommandPattern.RestaurantComponents.Commands;
55

6-
internal class ServeFoodCommand : AbstractCommand<IFoodRequest>, IFoodCommand
6+
internal class ServeFoodCommand : Command<IFoodRequest>, IFoodCommand
77
{
88
public override void Execute()
99
{

GofConsoleApp/Examples/Behavioral/CommandPattern/RestaurantComponents/Requests/IFoodRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using GofPatterns.Behavioral.CommandPattern.Interfaces;
1+
using GofPatterns.Behavioral.CommandPattern;
22

33
namespace GofConsoleApp.Examples.Behavioral.CommandPattern.RestaurantComponents.Requests;
44

GofConsoleApp/Examples/Behavioral/ObserverPattern/Components/PersonAndrewSmith.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Core.Console.Interfaces;
2-
using GofPatterns.Behavioral.ObserverPattern.Interfaces;
2+
using GofPatterns.Behavioral.ObserverPattern;
33

44
namespace GofConsoleApp.Examples.Behavioral.ObserverPattern.Components;
55

GofConsoleApp/Examples/Behavioral/ObserverPattern/Components/PersonJohnDoe.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Core.Console.Interfaces;
2-
using GofPatterns.Behavioral.ObserverPattern.Interfaces;
2+
using GofPatterns.Behavioral.ObserverPattern;
33

44
namespace GofConsoleApp.Examples.Behavioral.ObserverPattern.Components;
55

0 commit comments

Comments
 (0)