July 2019
Intermediate to advanced
410 pages
10h 32m
English
The CatalogService interface represents the console application the team is building and is described as having a single Run method, as shown in the ICatalogService interface:
interface ICatalogService{ void Run();}
The service has two dependencies, IUserInterface and IInventoryCommandFactory, and they will be injected into the constructor and stored as local variables:
public class CatalogService : ICatalogService{ private readonly IUserInterface _userInterface; private readonly IInventoryCommandFactory _commandFactory; public CatalogService(IUserInterface userInterface, IInventoryCommandFactory commandFactory) { _userInterface = userInterface; _commandFactory = commandFactory; } ...}
The Run method is based on the earlier ...
Read now
Unlock full access