Skip to content

Commit c1ce7ec

Browse files
committed
⚰️ removed dead code
1 parent 00690a7 commit c1ce7ec

File tree

2 files changed

+1
-59
lines changed

2 files changed

+1
-59
lines changed

src/Codebelt.Extensions.Asp.Versioning/RestfulProblemDetailsFactory.cs

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/Codebelt.Extensions.Asp.Versioning/ServiceCollectionExtensions.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
using Asp.Versioning;
33
using Cuemon;
44
using Microsoft.Extensions.DependencyInjection;
5-
using Microsoft.Extensions.DependencyInjection.Extensions;
6-
#if NET8_0_OR_GREATER
75
using Cuemon.AspNetCore.Http;
8-
#endif
96

107
namespace Codebelt.Extensions.Asp.Versioning
118
{
@@ -43,11 +40,6 @@ public static IServiceCollection AddRestfulApiVersioning(this IServiceCollection
4340
o.SubstituteApiVersionInUrl = true;
4441
});
4542

46-
#if NET6_0
47-
if (options.ProblemDetailsFactoryType != null && options.ProblemDetailsFactoryType != typeof(DefaultProblemDetailsFactory)) { services.Replace(ServiceDescriptor.Singleton(_ => Activator.CreateInstance(options.ProblemDetailsFactoryType) as IProblemDetailsFactory)); }
48-
#endif
49-
50-
#if NET8_0_OR_GREATER
5143
if (options.UseBuiltInRfc7807)
5244
{
5345
services.AddProblemDetails();
@@ -65,7 +57,7 @@ public static IServiceCollection AddRestfulApiVersioning(this IServiceCollection
6557
throw new InternalServerErrorException(pd.Detail);
6658
});
6759
}
68-
#endif
60+
6961
return services;
7062
}
7163
}

0 commit comments

Comments
 (0)