This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TransactionGate{ | |
... | |
var orderItems = GetOrderItems(); | |
foreach(var orderItem in orderItems) | |
{ | |
transactionBundle.Add(orderItem); | |
} | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TransactionGate{ | |
... | |
var orderItems = GetOrderItems(); | |
foreach(var orderItem in orderItems) | |
{ | |
if(!transactionBundle.Contains(orderItem)){ | |
transactionBundle.Add(orderItem); | |
} | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TransactionGate{ | |
... | |
var orderItems = GetOrderItems(); | |
orderItems = GetUniqueOrderItems(); | |
foreach(var orderItem in orderItems) | |
{ | |
transactionBundle.Add(orderItem); | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TransactionGate{ | |
... | |
var orderItems = GetOrderItems(); | |
var uniqueOrderItems = GetUniqueOrderItems(orderItems); | |
foreach(var orderItem in uniqueOrderItems) | |
{ | |
transactionBundle.Add(orderItem); | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OrdersFacade{ | |
private IExternalCustomerApiService customerApiService; | |
private IOrderRepository orderRepository; | |
... | |
public OrdersFacade( | |
IExternalCustomerApiService customerApiService, | |
IOrderRepository orderRepository, | |
... | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OrdersFacade{ | |
private IExternalCustomerApiService customerApiService; | |
private IOrderRepository orderRepository; | |
... | |
public OrdersFacade( | |
IExternalCustomerApiService customerApiService, | |
IOrderRepository orderRepository, | |
... | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OrderVatCalculator{ | |
public Order AddVatIfNotCompany(Order order, bool isCompany) | |
{ | |
decimal vat = 1.21; | |
if(!isCompany){ | |
order.Price = order.Price * vat; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Movie | |
{ | |
public string Title { get; set; } | |
public string Description { get; set; } | |
public List<Actor> Actors { get; set; } = new List<Actor>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MovieService | |
{ | |
public void Create(string title, string decription, List<Actor> actors) { ... } | |
public void AddActor(Movie movie, Actor actor){ ... } | |
public List<Actor> GetMainActors(Movie movie) { ... } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Mediator | |
{ | |
public abstract void Send(string message, Colleague colleague); | |
} |
OlderNewer