Skip to content

Commit ed6ca0d

Browse files
committed
Remove unused generic constraint
1 parent c626308 commit ed6ca0d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Source/Boxed.AspNetCore/ServiceCollectionExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static IServiceCollection AddIfElse(
9494
public static IServiceCollection ConfigureSingleton<TOptions>(
9595
this IServiceCollection services,
9696
IConfiguration configuration)
97-
where TOptions : class, new()
97+
where TOptions : class
9898
{
9999
ArgumentNullException.ThrowIfNull(services);
100100
ArgumentNullException.ThrowIfNull(configuration);
@@ -116,7 +116,7 @@ public static IServiceCollection ConfigureSingleton<TOptions>(
116116
this IServiceCollection services,
117117
IConfiguration configuration,
118118
Action<BinderOptions> configureBinder)
119-
where TOptions : class, new()
119+
where TOptions : class
120120
{
121121
ArgumentNullException.ThrowIfNull(services);
122122
ArgumentNullException.ThrowIfNull(configuration);
@@ -137,7 +137,7 @@ public static IServiceCollection ConfigureSingleton<TOptions>(
137137
public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
138138
this IServiceCollection services,
139139
IConfiguration configuration)
140-
where TOptions : class, new()
140+
where TOptions : class
141141
{
142142
ArgumentNullException.ThrowIfNull(services);
143143
ArgumentNullException.ThrowIfNull(configuration);
@@ -163,7 +163,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
163163
this IServiceCollection services,
164164
IConfiguration configuration,
165165
Action<BinderOptions> configureBinder)
166-
where TOptions : class, new()
166+
where TOptions : class
167167
{
168168
ArgumentNullException.ThrowIfNull(services);
169169
ArgumentNullException.ThrowIfNull(configuration);
@@ -189,7 +189,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
189189
this IServiceCollection services,
190190
IConfiguration configuration,
191191
Func<TOptions, bool> validation)
192-
where TOptions : class, new()
192+
where TOptions : class
193193
{
194194
ArgumentNullException.ThrowIfNull(services);
195195
ArgumentNullException.ThrowIfNull(configuration);
@@ -219,7 +219,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
219219
IConfiguration configuration,
220220
Func<TOptions, bool> validation,
221221
Action<BinderOptions> configureBinder)
222-
where TOptions : class, new()
222+
where TOptions : class
223223
{
224224
ArgumentNullException.ThrowIfNull(services);
225225
ArgumentNullException.ThrowIfNull(configuration);
@@ -249,7 +249,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
249249
IConfiguration configuration,
250250
Func<TOptions, bool> validation,
251251
string failureMessage)
252-
where TOptions : class, new()
252+
where TOptions : class
253253
{
254254
ArgumentNullException.ThrowIfNull(services);
255255
ArgumentNullException.ThrowIfNull(configuration);
@@ -282,7 +282,7 @@ public static IServiceCollection ConfigureAndValidateSingleton<TOptions>(
282282
Func<TOptions, bool> validation,
283283
string failureMessage,
284284
Action<BinderOptions> configureBinder)
285-
where TOptions : class, new()
285+
where TOptions : class
286286
{
287287
ArgumentNullException.ThrowIfNull(services);
288288
ArgumentNullException.ThrowIfNull(configuration);

0 commit comments

Comments
 (0)