Skip to content

Commit 71eb3f0

Browse files
committed
fixed texts
1 parent 01512fd commit 71eb3f0

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

Application/Application.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
<Reference Include="System.Xml" />
4242
</ItemGroup>
4343
<ItemGroup>
44-
<Compile Include="Inventory\EventHandlers\SubtractInventaryWhenOrderPayedEventHandler.cs" />
44+
<Compile Include="Inventory\EventHandlers\SubtractInventaryWhenOrderPaidEventHandler.cs" />
4545
<Compile Include="Inventory\InventoryService.cs" />
4646
<Compile Include="NotificationsHandler.cs" />
47-
<Compile Include="Orders\EventHandlers\PlaceOrderWhenPayedEventHandler.cs" />
47+
<Compile Include="Orders\EventHandlers\PlaceOrderWhenPaidEventHandler.cs" />
4848
<Compile Include="Orders\OrderPlacementService.cs" />
4949
<Compile Include="Payments\PaymentService.cs" />
5050
<Compile Include="Properties\AssemblyInfo.cs" />

Application/Inventory/EventHandlers/SubtractInventaryWhenOrderPayedEventHandler.cs renamed to Application/Inventory/EventHandlers/SubtractInventaryWhenOrderPaidEventHandler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99

1010
namespace Minduca.Application.Inventory.EventHandlers
1111
{
12-
public class SubtractInventaryWhenOrderPayedEventHandler : IHandles<OrderPayedEvent>
12+
public class SubtractInventaryWhenOrderPaidEventHandler : IHandles<OrderPaidEvent>
1313
{
1414
private readonly IInventoryService _inventory;
1515

16-
public SubtractInventaryWhenOrderPayedEventHandler(IInventoryService inventory)
16+
public SubtractInventaryWhenOrderPaidEventHandler(IInventoryService inventory)
1717
{
1818
_inventory = inventory;
1919
}
2020

2121
public bool Deferred { get { return false; } }
2222

23-
public void Handle(OrderPayedEvent domainEvent)
23+
public void Handle(OrderPaidEvent domainEvent)
2424
{
25-
System.Console.WriteLine("[Event] - SubtractInventaryWhenOrderPayedEventHandler.Handle(domainEvent)");
25+
System.Console.WriteLine("[Event] - SubtractInventaryWhenOrderPaidEventHandler.Handle(domainEvent)");
2626
foreach (var item in domainEvent.OrderItems)
2727
_inventory.SubtractAvailability(item.InventoryItemId, item.Quantity);
2828
}

Application/NotificationsHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Minduca.BoundedContexts
1212
{
13-
public class NotificationsHandler : IHandles<OrderPayedEvent>, IHandles<OrderShippedEvent> //<- multiple events handled by a single handler
13+
public class NotificationsHandler : IHandles<OrderPaidEvent>, IHandles<OrderShippedEvent> //<- multiple events handled by a single handler
1414
{
1515
private readonly IUserNotifier _notifier;
1616

@@ -21,10 +21,10 @@ public NotificationsHandler(IUserNotifier notifier) // <-- instantiated by the d
2121

2222
public bool Deferred { get { return true; } } //<- 'true' here indicates that all these events should be invoked only after the transaction is committed
2323

24-
public void Handle(OrderPayedEvent domainEvent)
24+
public void Handle(OrderPaidEvent domainEvent)
2525
{
2626
System.Console.WriteLine("[Event] - NotificationsHandler.Handle(domainEvent)");
27-
_notifier.Notify("Yay! We received your money. Your order has been placed");
27+
_notifier.Notify("Yay! Your payment has been processed.");
2828
}
2929

3030
public void Handle(OrderShippedEvent domainEvent)

Application/Orders/EventHandlers/PlaceOrderWhenPayedEventHandler.cs renamed to Application/Orders/EventHandlers/PlaceOrderWhenPaidEventHandler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99

1010
namespace Minduca.Application.Orders.EventHandlers
1111
{
12-
public class PlaceOrderWhenPayedEventHandler : IHandles<OrderPayedEvent>
12+
public class PlaceOrderWhenPaidEventHandler : IHandles<OrderPaidEvent>
1313
{
1414
private readonly IOrderPlacementService _orderPlacement;
1515

16-
public PlaceOrderWhenPayedEventHandler(IOrderPlacementService orderPlacement)
16+
public PlaceOrderWhenPaidEventHandler(IOrderPlacementService orderPlacement)
1717
{
1818
_orderPlacement = orderPlacement;
1919
}
2020

2121
public bool Deferred { get { return false; } }
2222

23-
public void Handle(OrderPayedEvent domainEvent)
23+
public void Handle(OrderPaidEvent domainEvent)
2424
{
25-
System.Console.WriteLine("[Event] - PlaceOrderWhenPayedEventHandler.Handle(domainEvent)");
25+
System.Console.WriteLine("[Event] - PlaceOrderWhenPaidEventHandler.Handle(domainEvent)");
2626
_orderPlacement.PlaceOrder(domainEvent.Payment.OrderId);
2727
}
2828
}

Application/Payments/PaymentService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void PayOrder(int orderId, decimal amount)
3333

3434
_paymentRepository.Insert(payment);
3535

36-
_events.Raise(new OrderPayedEvent(payment, order.Items));
36+
_events.Raise(new OrderPaidEvent(payment, order.Items));
3737
}
3838
}
3939
}

Domain/Core/Data/IDbStateTracker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Minduca.Domain.Core.Data
44
{
55

66
/// <summary>
7-
/// Tracks the database state
7+
/// Tracks the database's state
88
/// </summary>
99
public interface IDbStateTracker : IDisposable
1010
{

Domain/Domain.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<Compile Include="Inventory\IInventoryService.cs" />
5252
<Compile Include="Orders\EOrderStatus.cs" />
5353
<Compile Include="Orders\OrderItem.cs" />
54-
<Compile Include="Payments\Events\OrderPayedEvent.cs" />
54+
<Compile Include="Payments\Events\OrderPaidEvent.cs" />
5555
<Compile Include="Orders\Events\OrderShippedEvent.cs" />
5656
<Compile Include="Orders\IOrderPlacementService.cs" />
5757
<Compile Include="Orders\Order.cs" />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
namespace Minduca.Domain.Payments.Events
1010
{
11-
public class OrderPayedEvent : IDomainEvent
11+
public class OrderPaidEvent : IDomainEvent
1212
{
13-
public OrderPayedEvent(Payment payment, IEnumerable<OrderItem> orderItems)
13+
public OrderPaidEvent(Payment payment, IEnumerable<OrderItem> orderItems)
1414
{
1515
Payment = payment;
1616
OrderItems = new List<OrderItem>(orderItems);

Infrastructure/DomainEventsRaiser.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class DomainEventsRaiser : IDomainEventsRaiser
1111
/// <summary>
1212
/// Locator of event handlers
1313
/// </summary>
14-
private readonly IServiceProvider _resolver;
14+
private readonly IServiceProvider _locator;
1515

16-
internal DomainEventsRaiser(IServiceProvider resolver)
16+
internal DomainEventsRaiser(IServiceProvider locator)
1717
{
18-
_resolver = resolver;
18+
_locator = locator;
1919
}
2020

2121
/// <summary>
@@ -26,7 +26,7 @@ internal DomainEventsRaiser(IServiceProvider resolver)
2626
public void Raise<T>(T domainEvent) where T : IDomainEvent
2727
{
2828
//Get all the handlers that handle events of type T
29-
IHandles<T>[] allHandlers = (IHandles<T>[])_resolver.GetService(typeof(IHandles<T>[]));
29+
IHandles<T>[] allHandlers = (IHandles<T>[])_locator.GetService(typeof(IHandles<T>[]));
3030

3131
if (allHandlers != null && allHandlers.Length > 0)
3232
foreach (var handler in allHandlers)

0 commit comments

Comments
 (0)