-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathInEngineSettings.cs
More file actions
27 lines (25 loc) · 886 Bytes
/
InEngineSettings.cs
File metadata and controls
27 lines (25 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System.Collections.Generic;
using System.IO;
using InEngine.Core.Queuing;
using Microsoft.Extensions.Configuration;
namespace InEngine.Core
{
public class InEngineSettings
{
public static string BasePath { get; set; } = Directory.GetCurrentDirectory();
public static string ConfigurationFile { get; set; } = "appsettings.json";
public List<string> Plugins { get; set; } = new List<string>();
public QueueSettings Queue { get; set; }
public static InEngineSettings Make()
{
var inEngineSettings = new InEngineSettings();
new ConfigurationBuilder()
.SetBasePath(BasePath)
.AddJsonFile(ConfigurationFile)
.Build()
.GetSection("InEngine")
.Bind(inEngineSettings);
return inEngineSettings;
}
}
}