Configuration is one of the core fundamentals of any .NET application. Whether it's a web application, an API, a desktop application or anything in between, every application has settings and options that make it configurable, flexible and functional. From simple numbers and booleans to connection strings that need to be stored and loaded securely, everything needs to be handled with care and a complete understanding of how they work and what is happening under the hood. In this course, Microsoft Senior Content Developer David Pine will teach you everything you need to know to get up to speed with Configuration and Options in .NET.
Welcome
What will you learn in this course?
Who is the course for and prerequisites
Introduction
What is Configuration?
Why configuration is important?
Configuration in .NET
Configuration sources & providers
First Configuration NuGet package
Explore the IConfiguration and related APIs
Section Recap
Introduction
Standalone vs. Host
What’s a ConfigurationManager?
Exploring the Worker Service default configuration
Running the Worker Service with template behavior
Learning the JSON configuration provider capabilities
Environment specific configuration
Configuring and manually parsing custom values
Benefiting from the Binder package
Section Recap
Introduction to Configuration Providers
Base File Providers
Discussing the empty application builder sample app
JSON configuration provider
XML configuration provider
INI configuration provider
User Secrets configuration provider
Managing user secrets
Environment Variables configuration provider
Command-line configuration provider
Key-per file configuration provider
Azure Key Vault configuration provider
Azure App Configuration provider with Key Vault secrets
Section Recap
Introduction to Implementing a Custom Configuration Provider
Create the implementation class library
Implement the IConfigurationSource
Implement the IConfigurationProvider
Extend IConfigurationBuilder and expose AddYamlFile APIs
Implementing the YAML parser
Review and Finalize implementation details
Consuming YAML configuration with custom provider
Section Recap
Introduction to the Options Pattern
Modeling the Logging Options
Bind Logging Options to Configuration
Consuming Logging Options through DI
Adding another options-modeled object
Binding additional named-options
Configuring and editing named-options
Resolving named-options by name
Verifying configuration bindings and DI hydration
Considering alternative APIs for registering options
Overriding configurations with post configure APIs
Overriding all config-bound instances
Avoid implementing IOptions<T>
Understanding reflection-based binding
Enabling source-generated configuration binding
Section Recap
Introduction to Validating Options
Implementing the IValidateOptions<TOptions> interface
Registering options with validation
Using data-annotations for declarative validation
Handling validation errors
Expressing simple delegate-based validation with fluent APIs
Controlling when validation errors occur
Compile-time validation with source-generators
Section Recap
Introduction to Options Monitoring
Differentiating Options interfaces
Visualizing an Alerting App Scenario
Exploring the Alerting Implementation
Post Code-walk: Options and Settings
Changing Config Data & Monitoring Alerts
Being Mindful of Monitoring Limitations
Section Recap
Introduction to Consumer-Centric (Empathy-based) Authoring
Defining Strongly-typed WidgetOptions
Debating namespace Naming: IServiceCollection Extensions
Exploring an Add* with IConfigurationSection API
Consuming the Add* with IConfigurationSection
Improving consumer experiences through meaningful error messages
Confirming new consumer experiences
Considerations when accepting Option-types as Add* API parameters
Consuming the Add* with Options-type API
Exposing an Action<WidgetOptions> API
The Importance of Consistent APIs
Using the configureOptions delegate-based API
Section Recap
Conclusion
Course Info
Lifetime access
Add to Cart
David Pine works in Developer Relations at Microsoft, focusing on .NET and Azure developer content. He is recognized as a Google Developer Expert in Web Technologies. David is the O'Reilly Media author of "Learning Blazor: Build Single-Page Apps with WebAssembly and C#". David focuses on the developer community, actively seeking opportunities to share knowledge through speaking engagements around the world. David advocates for open-source, the .NET Foundation, C#, TypeScript, SignalR, Reactive Extensions, Azure and .NET. He's a co-host of the On .NET Live stream, part of the .NET Live TV family of streaming shows.
More courses by David Pine© 2023 Dometrain. All rights reserved.