File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ namespace OpenShock.LiveControlGateway.Options;
1111/// </summary>
1212public sealed class LcgOptions
1313{
14+ /// <summary>
15+ /// IConfiguration section path
16+ /// </summary>
17+ public const string SectionName = "OpenShock:LCG" ;
18+
1419 /// <summary>
1520 /// FQDN of the LCG
1621 /// </summary>
Original file line number Diff line number Diff line change 1+ using Microsoft . Extensions . Options ;
12using OpenShock . Common ;
23using OpenShock . Common . Extensions ;
34using OpenShock . Common . JsonSerialization ;
67using OpenShock . Common . Swagger ;
78using OpenShock . LiveControlGateway ;
89using OpenShock . LiveControlGateway . LifetimeManager ;
10+ using OpenShock . LiveControlGateway . Options ;
911using OpenShock . LiveControlGateway . PubSub ;
1012
1113var builder = OpenShockApplication . CreateDefaultBuilder < Program > ( args , options =>
2022
2123builder . RegisterCommonOpenShockOptions ( ) ;
2224
25+ builder . Services . Configure < LcgOptions > ( builder . Configuration . GetRequiredSection ( LcgOptions . SectionName ) ) ;
26+ builder . Services . AddSingleton < IValidateOptions < LcgOptions > , LcgOptionsValidator > ( ) ;
27+
2328var databaseConfig = builder . Configuration . GetDatabaseOptions ( ) ;
2429var redisConfig = builder . Configuration . GetRedisConfigurationOptions ( ) ;
2530
You can’t perform that action at this time.
0 commit comments