@@ -19,8 +19,7 @@ public static OptionsBuilder<TOptions> ConfigurePerTenant<TOptions, TTenantInfo>
19
19
where TOptions : class
20
20
where TTenantInfo : class , ITenantInfo , new ( )
21
21
{
22
- // TODO use ThrowNull here?
23
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
22
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
24
23
25
24
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
26
25
@@ -44,7 +43,7 @@ public static OptionsBuilder<TOptions> ConfigurePerTenant<TOptions, TDep, TTenan
44
43
where TDep : class
45
44
where TTenantInfo : class , ITenantInfo , new ( )
46
45
{
47
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
46
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
48
47
49
48
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
50
49
@@ -70,7 +69,7 @@ public static OptionsBuilder<TOptions> ConfigurePerTenant<TOptions, TDep1, TDep2
70
69
where TDep2 : class
71
70
where TTenantInfo : class , ITenantInfo , new ( )
72
71
{
73
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
72
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
74
73
75
74
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
76
75
@@ -99,7 +98,7 @@ public static OptionsBuilder<TOptions> ConfigurePerTenant<TOptions, TDep1, TDep2
99
98
where TDep3 : class
100
99
where TTenantInfo : class , ITenantInfo , new ( )
101
100
{
102
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
101
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
103
102
104
103
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
105
104
@@ -130,7 +129,7 @@ public static OptionsBuilder<TOptions> ConfigurePerTenant<TOptions, TDep1, TDep2
130
129
where TDep4 : class
131
130
where TTenantInfo : class , ITenantInfo , new ( )
132
131
{
133
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
132
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
134
133
135
134
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
136
135
@@ -194,7 +193,7 @@ public static OptionsBuilder<TOptions> PostConfigurePerTenant<TOptions, TTenantI
194
193
where TOptions : class
195
194
where TTenantInfo : class , ITenantInfo , new ( )
196
195
{
197
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
196
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
198
197
199
198
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
200
199
@@ -218,7 +217,7 @@ public static OptionsBuilder<TOptions> PostConfigurePerTenant<TOptions, TDep, TT
218
217
where TDep : class
219
218
where TTenantInfo : class , ITenantInfo , new ( )
220
219
{
221
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
220
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
222
221
223
222
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
224
223
@@ -244,7 +243,7 @@ public static OptionsBuilder<TOptions> PostConfigurePerTenant<TOptions, TDep1, T
244
243
where TDep2 : class
245
244
where TTenantInfo : class , ITenantInfo , new ( )
246
245
{
247
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
246
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
248
247
249
248
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
250
249
@@ -273,7 +272,7 @@ public static OptionsBuilder<TOptions> PostConfigurePerTenant<TOptions, TDep1, T
273
272
where TDep3 : class
274
273
where TTenantInfo : class , ITenantInfo , new ( )
275
274
{
276
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
275
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
277
276
278
277
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
279
278
@@ -304,7 +303,7 @@ public static OptionsBuilder<TOptions> PostConfigurePerTenant<TOptions, TDep1, T
304
303
where TDep4 : class
305
304
where TTenantInfo : class , ITenantInfo , new ( )
306
305
{
307
- if ( configureOptions == null ) throw new ArgumentNullException ( nameof ( configureOptions ) ) ;
306
+ ArgumentNullException . ThrowIfNull ( configureOptions ) ;
308
307
309
308
FinbuckleServiceCollectionExtensions . ConfigurePerTenantReqs < TOptions > ( optionsBuilder . Services ) ;
310
309
0 commit comments