File tree 1 file changed +18
-11
lines changed
WMS.WebUI/WMS.WebUI/Extensions
1 file changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -7,20 +7,27 @@ public static class DependencyInjection
7
7
{
8
8
public static IServiceCollection AddSyncfusion ( this IServiceCollection services , IConfiguration configuration )
9
9
{
10
- var section = configuration . GetSection ( "Keys" ) ;
11
- var key = section . GetValue < string > ( "Syncfusion" ) ?? "asd" ;
12
-
13
- if ( string . IsNullOrEmpty ( key ) )
10
+ try
14
11
{
15
- throw new InvalidOperationException ( "Cannot register Syncfusion without key. ") ;
16
- }
12
+ var section = configuration . GetSection ( "Keys ") ;
13
+ var key = section . GetValue < string > ( "Syncfusion" ) ?? "asd" ;
17
14
18
- services . AddOptions < ApiConfiguration > ( )
19
- . Bind ( configuration . GetSection ( ApiConfiguration . SectionName ) )
20
- . ValidateDataAnnotations ( )
21
- . ValidateOnStart ( ) ;
15
+ if ( string . IsNullOrEmpty ( key ) )
16
+ {
17
+ throw new InvalidOperationException ( "Cannot register Syncfusion without key." ) ;
18
+ }
22
19
23
- SyncfusionLicenseProvider . RegisterLicense ( key ) ;
20
+ services . AddOptions < ApiConfiguration > ( )
21
+ . Bind ( configuration . GetSection ( ApiConfiguration . SectionName ) )
22
+ . ValidateDataAnnotations ( )
23
+ . ValidateOnStart ( ) ;
24
+
25
+ SyncfusionLicenseProvider . RegisterLicense ( key ) ;
26
+ }
27
+ catch ( Exception ex )
28
+ {
29
+
30
+ }
24
31
25
32
return services ;
26
33
}
You can’t perform that action at this time.
0 commit comments