File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 2121
2222var builder = OpenShockApplication . CreateDefaultBuilder < Program > ( args ) ;
2323
24+ #region Config
25+
2426builder . RegisterCommonOpenShockOptions ( ) ;
2527
28+ builder . Services . Configure < FrontendOptions > ( builder . Configuration . GetRequiredSection ( FrontendOptions . SectionName ) ) ;
29+ builder . Services . AddSingleton < IValidateOptions < FrontendOptions > , FrontendOptionsValidator > ( ) ;
30+
2631var databaseConfig = builder . Configuration . GetDatabaseOptions ( ) ;
2732var redisConfig = builder . Configuration . GetRedisConfigurationOptions ( ) ;
2833
34+ #endregion
35+
2936builder . Services . AddOpenShockServices ( databaseConfig , redisConfig ) ;
3037
3138builder . Services . AddSignalR ( )
Original file line number Diff line number Diff line change @@ -16,9 +16,6 @@ public static WebApplicationBuilder RegisterCommonOpenShockOptions(this WebAppli
1616 builder . Services . Configure < RedisOptions > ( builder . Configuration . GetRequiredSection ( RedisOptions . SectionName ) ) ;
1717 builder . Services . AddSingleton < IValidateOptions < RedisOptions > , RedisOptionsValidator > ( ) ;
1818
19- builder . Services . Configure < FrontendOptions > ( builder . Configuration . GetRequiredSection ( FrontendOptions . SectionName ) ) ;
20- builder . Services . AddSingleton < IValidateOptions < FrontendOptions > , FrontendOptionsValidator > ( ) ;
21-
2219 builder . Services . Configure < MetricsOptions > ( builder . Configuration . GetSection ( MetricsOptions . SectionName ) ) ;
2320 builder . Services . AddSingleton < IValidateOptions < MetricsOptions > , MetricsOptionsValidator > ( ) ;
2421
You can’t perform that action at this time.
0 commit comments