Sphyrnidae Common Library
2.0.1
Shared Utilities/Library
|
Application Settings are those settings that are application-specific. Because this is application-specific, there is no default implementation. It will be up to you to implement the interface, and setup Dependency Injection (DI) for this implementation. Best practice is to place your implementation in a "Settings" folder off the root of your project.
The IApplicationSettings interface has the following properties to implement:
Interface: IApplicationSettings
Mock: ApplicationSettingsMock
Implementation: None (You must implement)
public class MyApplicationSettings : IApplicationSettings { protected IWebHostEnvironment WebHost { get; } public MyApplicationSettings(IWebHostEnvironment webHost) => WebHost = webHost; public string Name => "My Application"; public string Description => "Description of my application"; public string ContactName => "Me"; public string ContactEmail => "foo@foo.com"; public string Environment => WebHost.EnvironmentName; }