forked from amkovkov/GranuSightSoftware2
feat: Camera settings + some refactor
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace GSS2.Core.Extentions;
|
||||
|
||||
public static class ConfiurationSectionExtensions
|
||||
{
|
||||
public static Dictionary<string, string> AsDictionary(this IConfigurationSection values)
|
||||
{
|
||||
var dict = new Dictionary<string, string>();
|
||||
foreach (var (key, value) in values.AsEnumerable())
|
||||
if (value is not null)
|
||||
dict.Add(key.Substring(values.Path.Length + 1), value);
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user