Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 0626ce6

Browse files
committed
Refactoring
1 parent 44a12d6 commit 0626ce6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/NET6CustomLibrary/Extensions/DependencyInjection.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ public static IServiceCollection AddSerilogServices(this IServiceCollection serv
1212

1313
public static IServiceCollection AddSerilogSeqServices(this IServiceCollection services)
1414
{
15-
Log.Logger = new LoggerConfiguration().MinimumLevel.Debug().CreateLogger();
15+
Log.Logger = new LoggerConfiguration()
16+
.MinimumLevel.Debug()
17+
.CreateLogger();
1618

1719
services.AddTransient<ILoggerService, LoggerService>();
1820

@@ -208,6 +210,7 @@ public static IServiceCollection AddDbContextUseSQLite<TDbContext>(this IService
208210
#endregion
209211

210212
#region "HEALTH CHECKS"
213+
[Obsolete("This method will be deprecated in future releases.", false)]
211214
public static IServiceCollection AddMySqlHealthChecks(this IServiceCollection services, string connectionString, string nameAsyncCheck)
212215
{
213216
services.AddHealthChecks()
@@ -229,6 +232,7 @@ public static IServiceCollection AddMySqlHealthChecks(this IServiceCollection se
229232
return services;
230233
}
231234

235+
[Obsolete("This method will be deprecated in future releases.", false)]
232236
public static IServiceCollection AddPostgresHealthChecks(this IServiceCollection services, string connectionString, string nameAsyncCheck)
233237
{
234238
services.AddHealthChecks()
@@ -250,6 +254,7 @@ public static IServiceCollection AddPostgresHealthChecks(this IServiceCollection
250254
return services;
251255
}
252256

257+
[Obsolete("This method will be deprecated in future releases.", false)]
253258
public static IServiceCollection AddSqlServerHealthChecks(this IServiceCollection services, string connectionString, string nameAsyncCheck)
254259
{
255260
services.AddHealthChecks()
@@ -271,6 +276,7 @@ public static IServiceCollection AddSqlServerHealthChecks(this IServiceCollectio
271276
return services;
272277
}
273278

279+
[Obsolete("This method will be deprecated in future releases.", false)]
274280
public static IEndpointRouteBuilder AddDatabaseHealthChecks(this IEndpointRouteBuilder builder, string pattern, bool allowAnonymous = false)
275281
{
276282
if (!allowAnonymous)

0 commit comments

Comments
 (0)