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

Commit 41dc606

Browse files
committed
Sostituto WARN con ERR metodi deprecati
1 parent 7e25b7f commit 41dc606

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/NET6CustomLibrary/CustomResults/ResponseResult.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace NET6CustomLibrary.CustomResults;
22

3-
[Obsolete("This method will be deprecated in future releases.", false)]
3+
[Obsolete("This method will be deprecated in future releases.", true)]
44
public class ResponseResult
55
{
66
public bool Succeeded { get; set; }
@@ -10,7 +10,7 @@ public class ResponseResult
1010
public string InstancePath { get; set; }
1111
public string Detail { get; set; }
1212

13-
[Obsolete("This method will be deprecated in future releases.", false)]
13+
[Obsolete("This method will be deprecated in future releases.", true)]
1414
public ResponseResult(bool succeeded, int typeCode, HttpContext httpContext, object message, HttpStatusCode statusCodes)
1515
{
1616
Succeeded = succeeded;

src/NET6CustomLibrary/Extensions/DependencyInjection.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static IServiceCollection AddDateTimeOnlyAttributes(this IServiceCollecti
102102
#endregion
103103

104104
#region "DB CONTEXT EFCORE"
105-
[Obsolete("This method will be deprecated in future releases.", false)]
105+
[Obsolete("This method will be deprecated in future releases.", true)]
106106
public static IServiceCollection AddDbContextGenericsMethods<TDbContext>(this IServiceCollection services) where TDbContext : DbContext
107107
{
108108
services.AddScoped<DbContext, TDbContext>();
@@ -122,7 +122,7 @@ public static IServiceCollection AddDbContextGenericsMethods<TDbContext>(this IS
122122
// return services;
123123
//}
124124

125-
[Obsolete("This method will be deprecated in future releases.", false)]
125+
[Obsolete("This method will be deprecated in future releases.", true)]
126126
public static IServiceCollection AddDbContextUseMySql<TDbContext>(this IServiceCollection services, string connectionString, int retryOnFailure) where TDbContext : DbContext
127127
{
128128
services.AddDbContextPool<TDbContext>(optionBuilder =>
@@ -144,7 +144,7 @@ public static IServiceCollection AddDbContextUseMySql<TDbContext>(this IServiceC
144144
return services;
145145
}
146146

147-
[Obsolete("This method will be deprecated in future releases.", false)]
147+
[Obsolete("This method will be deprecated in future releases.", true)]
148148
public static IServiceCollection AddDbContextUsePostgres<TDbContext>(this IServiceCollection services, string connectionString, int retryOnFailure) where TDbContext : DbContext
149149
{
150150
services.AddDbContextPool<TDbContext>(optionBuilder =>
@@ -167,7 +167,7 @@ public static IServiceCollection AddDbContextUsePostgres<TDbContext>(this IServi
167167
return services;
168168
}
169169

170-
[Obsolete("This method will be deprecated in future releases.", false)]
170+
[Obsolete("This method will be deprecated in future releases.", true)]
171171
public static IServiceCollection AddDbContextUseSQLServer<TDbContext>(this IServiceCollection services, string connectionString, int retryOnFailure) where TDbContext : DbContext
172172
{
173173
services.AddDbContextPool<TDbContext>(optionBuilder =>
@@ -194,7 +194,7 @@ public static IServiceCollection AddDbContextUseSQLServer<TDbContext>(this IServ
194194
return services;
195195
}
196196

197-
[Obsolete("This method will be deprecated in future releases.", false)]
197+
[Obsolete("This method will be deprecated in future releases.", true)]
198198
public static IServiceCollection AddDbContextUseSQLite<TDbContext>(this IServiceCollection services, string connectionString) where TDbContext : DbContext
199199
{
200200
services.AddDbContextPool<TDbContext>(optionsBuilder =>
@@ -210,7 +210,7 @@ public static IServiceCollection AddDbContextUseSQLite<TDbContext>(this IService
210210
#endregion
211211

212212
#region "HEALTH CHECKS"
213-
[Obsolete("This method will be deprecated in future releases.", false)]
213+
[Obsolete("This method will be deprecated in future releases.", true)]
214214
public static IServiceCollection AddMySqlHealthChecks(this IServiceCollection services, string connectionString, string nameAsyncCheck)
215215
{
216216
services.AddHealthChecks()
@@ -232,7 +232,7 @@ public static IServiceCollection AddMySqlHealthChecks(this IServiceCollection se
232232
return services;
233233
}
234234

235-
[Obsolete("This method will be deprecated in future releases.", false)]
235+
[Obsolete("This method will be deprecated in future releases.", true)]
236236
public static IServiceCollection AddPostgresHealthChecks(this IServiceCollection services, string connectionString, string nameAsyncCheck)
237237
{
238238
services.AddHealthChecks()
@@ -254,7 +254,7 @@ public static IServiceCollection AddPostgresHealthChecks(this IServiceCollection
254254
return services;
255255
}
256256

257-
[Obsolete("This method will be deprecated in future releases.", false)]
257+
[Obsolete("This method will be deprecated in future releases.", true)]
258258
public static IServiceCollection AddSqlServerHealthChecks(this IServiceCollection services, string connectionString, string nameAsyncCheck)
259259
{
260260
services.AddHealthChecks()
@@ -276,7 +276,7 @@ public static IServiceCollection AddSqlServerHealthChecks(this IServiceCollectio
276276
return services;
277277
}
278278

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

src/NET6CustomLibrary/Serilog/Models/ErrorResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace NET6CustomLibrary.Serilog.Models;
22

3-
[Obsolete("This method will be deprecated in future releases.", false)]
3+
[Obsolete("This method will be deprecated in future releases.", true)]
44
public class ErrorResponse
55
{
66
public string TitleCode { get; set; }

src/NET6CustomLibrary/Serilog/Services/ILoggerService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
public interface ILoggerService
44
{
5-
[Obsolete("This method will be deprecated in future releases.", false)]
5+
[Obsolete("This method will be deprecated in future releases.", true)]
66
ErrorResponse ManageError(string message, int statusCode, int typeCode, HttpContext httpContext);
77

88
/// <summary>

src/NET6CustomLibrary/Serilog/Services/LoggerService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public LoggerService(ILogger<LoggerService> logger)
1010
this.logger = logger;
1111
}
1212

13-
[Obsolete("This method will be deprecated in future releases.", false)]
13+
[Obsolete("This method will be deprecated in future releases.", true)]
1414
public ErrorResponse ManageError(string message, int statusCode, int typeCode, HttpContext httpContext)
1515
{
1616
logger.LogWarning(message);

0 commit comments

Comments
 (0)