Twenty sixth section: Extension uses the console HttpClientFactory, reads the configuration file, data protection, injection type

/// Overall Description: Here mainly through dependency injection procedures needed to obtain the relevant class on the console, and then use

/// (1) First to add dependency injection assemblies] [Microsoft.Extensions.DependencyInjection

/// (2). Add the required components of the assembly corresponding to and Addxxxx

/// (3) Create Provicder

/// (4) Using the corresponding object acquired Provider call GetService

/// PS: In addition to creating an exception to read the configuration file, others are roughly follow the above rule.

Guess you like

Origin www.cnblogs.com/yaopengfei/p/12122623.html