-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into BR-13-Socket-Timeout
- Loading branch information
Showing
6 changed files
with
38 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ionReader.Terminal/ApplicationSettings.cs → ...er.Entities/Config/ApplicationSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using BaseStationReader.Entities.Config; | ||
using Microsoft.Extensions.Configuration; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace BaseStationReader.Logic | ||
{ | ||
[ExcludeFromCodeCoverage] | ||
public class ConfigReader | ||
{ | ||
/// <summary> | ||
/// Load and return the application settings from the named JSON-format application settings file | ||
/// </summary> | ||
/// <returns></returns> | ||
public ApplicationSettings? Read(string jsonFileName) | ||
{ | ||
IConfiguration configuration = new ConfigurationBuilder() | ||
.AddJsonFile(jsonFileName) | ||
.Build(); | ||
|
||
IConfigurationSection section = configuration.GetSection("ApplicationSettings"); | ||
var settings = section.Get<ApplicationSettings>(); | ||
return settings; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters