Spectre.Console supports the ability to use dependency injection to find types for our commands. The library has an integration mechanism so that developers can use their favorite DI engine with their command-line app. In this lesson, we will learn how to integrate the .NET Extensions dependency injection engine with Spectre.Console. If you are unfamiliar with … Continue reading Lesson 1.5: Setting up Dependency Injection Components
Early in our development of the SimpleRPG game project, we set up a continuous integration pipeline to automate our build with every repo check-in. Now we are going to set up another pipeline for our game services. Since the services are in their own repository and solution and have different deployment requirements, we will need … Continue reading Lesson 5.11: Create CI Pipeline for Azure Functions Project
To this point, we have been using synchronous commands, but the Spectre.Console.Cli library also supports asynchronous commands. For anyone familiar with the async/await concepts in .NET, these commands follow the same pattern. When our commands use asynchronous APIs (for file I/O or web service calls), then we also need our commands to be asynchronous. With … Continue reading Lesson 1.4: Async Commands
In this lesson, we’re going to build out the three remaining services quickly. We will continue to use the same patterns (DTOs, repositories, and service helper class) that we’ve used in the previous lessons. If you need to review any of the individual patterns, please review those lessons. QuestTemplateService 1. Create the quests.json file in … Continue reading Lesson 5.10: Complete the Game Services
The Spectre.Console.Cli supports having multiple nested commands to enable multiple operations on a particular resource. For example: if we have a command with additional operations, we can represent that as nested commands: command operation1, command operation2, command operation3, and so on. To enable this type of nesting, the Spectre.Console.Cli provides the AddBranch configuration method. To … Continue reading Lesson 1.3: Nested Commands
With the changes to merge the Spectre.Cli and Spectre.Console packages, we had to update our existing lessons to the new combined package as well. Starting with Spectre.Console v0.36, both code bases are in a single package. Our tutorial lessons have also been updated to the new version. Lesson 1.1: Starting with Spectre.Console.Cli Lesson 1.2: Multiple, … Continue reading CLI Lessons Updated to Spectre.Console v0.36
Follow My Blog
Get new content delivered directly to your inbox.