Skip to content

Commit d38c3b6

Browse files
authored
Remove Obsolete API (#2366)
1 parent ae04b68 commit d38c3b6

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

src/HealthChecks.Sqlite/DependencyInjection/SqliteHealthCheckBuilderExtensions.cs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -40,47 +40,6 @@ public static IHealthChecksBuilder AddSqlite(
4040
return builder.AddSqlite(_ => connectionString, healthQuery, configure, name, failureStatus, tags, timeout);
4141
}
4242

43-
/// <summary>
44-
/// Add a health check for Sqlite databases.
45-
/// </summary>
46-
/// <param name="builder">The <see cref="IHealthChecksBuilder"/>.</param>
47-
/// <param name="connectionStringFactory">A factory to build the Sqlite connection string to be used.</param>
48-
/// <param name="healthQuery">The query to be used in check.</param>
49-
/// <param name="configure">An optional action to allow additional Sqlite specific configuration.</param>
50-
/// <param name="name">The health check name. Optional. If <c>null</c> the type name 'sqlite' will be used for the name.</param>
51-
/// <param name="failureStatus">
52-
/// The <see cref="HealthStatus"/> that should be reported when the health check fails. Optional. If <c>null</c> then
53-
/// the default status of <see cref="HealthStatus.Unhealthy"/> will be reported.
54-
/// </param>
55-
/// <param name="tags">A list of tags that can be used to filter sets of health checks. Optional.</param>
56-
/// <param name="timeout">An optional <see cref="TimeSpan"/> representing the timeout of the check.</param>
57-
/// <returns>The <see cref="IHealthChecksBuilder"/>.</returns>
58-
[Obsolete("This method is obsolete and will be removed in a future version. use AddSqlite with same parameters.")]
59-
public static IHealthChecksBuilder AddOracle(
60-
this IHealthChecksBuilder builder,
61-
Func<IServiceProvider, string> connectionStringFactory,
62-
string healthQuery = HEALTH_QUERY,
63-
Action<SqliteConnection>? configure = null,
64-
string? name = default,
65-
HealthStatus? failureStatus = default,
66-
IEnumerable<string>? tags = default,
67-
TimeSpan? timeout = default)
68-
{
69-
Guard.ThrowIfNull(connectionStringFactory);
70-
71-
return builder.Add(new HealthCheckRegistration(
72-
name ?? NAME,
73-
sp => new SqliteHealthCheck(new SqliteHealthCheckOptions
74-
{
75-
ConnectionString = connectionStringFactory(sp),
76-
CommandText = healthQuery,
77-
Configure = configure,
78-
}),
79-
failureStatus,
80-
tags,
81-
timeout));
82-
}
83-
8443
/// <summary>
8544
/// Add a health check for Sqlite databases.
8645
/// </summary>

test/HealthChecks.Sqlite.Tests/HealthChecks.Sqlite.approved.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ namespace Microsoft.Extensions.DependencyInjection
1818
{
1919
public static class SqliteHealthCheckBuilderExtensions
2020
{
21-
[System.Obsolete("This method is obsolete and will be removed in a future version. use AddSqlite wi" +
22-
"th same parameters.")]
23-
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddOracle(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, System.Func<System.IServiceProvider, string> connectionStringFactory, string healthQuery = "select name from sqlite_master where type='table'", System.Action<Microsoft.Data.Sqlite.SqliteConnection>? configure = null, string? name = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable<string>? tags = null, System.TimeSpan? timeout = default) { }
2421
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddSqlite(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, HealthChecks.Sqlite.SqliteHealthCheckOptions options, string? name = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable<string>? tags = null, System.TimeSpan? timeout = default) { }
2522
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddSqlite(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, System.Func<System.IServiceProvider, string> connectionStringFactory, string healthQuery = "select name from sqlite_master where type='table'", System.Action<Microsoft.Data.Sqlite.SqliteConnection>? configure = null, string? name = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable<string>? tags = null, System.TimeSpan? timeout = default) { }
2623
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddSqlite(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string connectionString, string healthQuery = "select name from sqlite_master where type='table'", System.Action<Microsoft.Data.Sqlite.SqliteConnection>? configure = null, string? name = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable<string>? tags = null, System.TimeSpan? timeout = default) { }

0 commit comments

Comments
 (0)