July 2019
Intermediate to advanced
410 pages
10h 32m
English
Likewise, classes requiring to modify the collection of books are updated to the IInventoryWriteContext interface, as illustrated with AddInventoryCommand:
internal class AddInventoryCommand : NonTerminatingCommand, IParameterisedCommand{ private readonly IInventoryWriteContext _context; internal AddInventoryCommand(IUserInterface userInterface, IInventoryWriteContext context) : base(userInterface) { _context = context; } public string InventoryName { get; private set; } ...}
The following shows the detail of the GetParameters and InternalCommand methods:
/// <summary>/// AddInventoryCommand requires name/// </summary>/// <returns></returns>public bool GetParameters(){ if (string.IsNullOrWhiteSpace(InventoryName))Read now
Unlock full access