@@ -101,7 +101,7 @@ public static IServiceCollection ConfigureSingleton<TOptions>(
101
101
102
102
return services
103
103
. Configure < TOptions > ( configuration )
104
- . AddSingleton ( x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
104
+ . AddSingleton ( static x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
105
105
}
106
106
107
107
/// <summary>
@@ -123,7 +123,7 @@ public static IServiceCollection ConfigureSingleton<TOptions>(
123
123
124
124
return services
125
125
. Configure < TOptions > ( configuration , configureBinder )
126
- . AddSingleton ( x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
126
+ . AddSingleton ( static x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
127
127
}
128
128
129
129
/// <summary>
@@ -147,7 +147,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
147
147
. Bind ( configuration )
148
148
. ValidateDataAnnotations ( )
149
149
. ValidateOnStart ( ) ;
150
- return services . AddSingleton ( x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
150
+ return services . AddSingleton ( static x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
151
151
}
152
152
153
153
/// <summary>
@@ -173,7 +173,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
173
173
. Bind ( configuration , configureBinder )
174
174
. ValidateDataAnnotations ( )
175
175
. ValidateOnStart ( ) ;
176
- return services . AddSingleton ( x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
176
+ return services . AddSingleton ( static x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
177
177
}
178
178
179
179
/// <summary>
@@ -201,7 +201,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
201
201
. ValidateDataAnnotations ( )
202
202
. Validate ( validation )
203
203
. ValidateOnStart ( ) ;
204
- return services . AddSingleton ( x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
204
+ return services . AddSingleton ( static x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
205
205
}
206
206
207
207
/// <summary>
@@ -231,7 +231,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
231
231
. ValidateDataAnnotations ( )
232
232
. Validate ( validation )
233
233
. ValidateOnStart ( ) ;
234
- return services . AddSingleton ( x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
234
+ return services . AddSingleton ( static x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
235
235
}
236
236
237
237
/// <summary>
@@ -262,7 +262,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
262
262
. ValidateDataAnnotations ( )
263
263
. Validate ( validation , failureMessage )
264
264
. ValidateOnStart ( ) ;
265
- return services . AddSingleton ( x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
265
+ return services . AddSingleton ( static x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
266
266
}
267
267
268
268
/// <summary>
@@ -295,6 +295,6 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
295
295
. ValidateDataAnnotations ( )
296
296
. Validate ( validation , failureMessage )
297
297
. ValidateOnStart ( ) ;
298
- return services . AddSingleton ( x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
298
+ return services . AddSingleton ( static x => x . GetRequiredService < IOptions < TOptions > > ( ) . Value ) ;
299
299
}
300
300
}
0 commit comments