Skip to content

Commit 7972e3a

Browse files
authored
Merge pull request #856 from Particular/obsolete-apis
Obsolete timeout manager APIs
2 parents 8576f96 + 306ba65 commit 7972e3a

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

src/SqlPersistence.Tests/ApprovalFiles/APIApprovals.Approve.approved.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ namespace NServiceBus.Persistence.Sql
2929
}
3030
public class static ScriptRunner
3131
{
32+
[System.ObsoleteAttribute(@"Timeout Manager is being deprecated. See upgrade guide for guidance on migrating to transport native delayed delivery. Use `Install(SqlDialect sqlDialect, string tablePrefix, Func<DbConnection> connectionBuilder, string scriptDirectory, bool shouldInstallOutbox, bool shouldInstallSagas, bool shouldInstallSubscriptions)` instead. Will be treated as an error from version 7.0.0. Will be removed in version 8.0.0.", false)]
3233
public static System.Threading.Tasks.Task Install(NServiceBus.SqlDialect sqlDialect, string tablePrefix, System.Func<System.Data.Common.DbConnection> connectionBuilder, string scriptDirectory, bool shouldInstallOutbox = True, bool shouldInstallSagas = True, bool shouldInstallSubscriptions = True, bool shouldInstallTimeouts = True) { }
34+
[System.ObsoleteAttribute(@"Timeout Manager is being deprecated. See upgrade guide for guidance on migrating to transport native delayed delivery. Use `Install(SqlDialect sqlDialect, string tablePrefix, Func<Type, DbConnection> connectionBuilder, string scriptDirectory, bool shouldInstallOutbox, bool shouldInstallSagas, bool shouldInstallSubscriptions)` instead. Will be treated as an error from version 7.0.0. Will be removed in version 8.0.0.", false)]
3335
public static System.Threading.Tasks.Task Install(NServiceBus.SqlDialect sqlDialect, string tablePrefix, System.Func<System.Type, System.Data.Common.DbConnection> connectionBuilder, string scriptDirectory, bool shouldInstallOutbox = True, bool shouldInstallSagas = True, bool shouldInstallSubscriptions = True, bool shouldInstallTimeouts = True) { }
3436
}
3537
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.All)]
@@ -75,6 +77,9 @@ namespace NServiceBus.Persistence.Sql
7577
public void ConnectionBuilder(System.Func<System.Data.Common.DbConnection> connectionBuilder) { }
7678
public void DisableCache() { }
7779
}
80+
[System.ObsoleteAttribute("Timeout Manager is being deprecated. See upgrade guide for guidance on migrating " +
81+
"to transport native delayed delivery. Will be treated as an error from version 7" +
82+
".0.0. Will be removed in version 8.0.0.", false)]
7883
public class TimeoutSettings
7984
{
8085
public void ConnectionBuilder(System.Func<System.Data.Common.DbConnection> connectionBuilder) { }

src/SqlPersistence/ScriptRunner.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ public static class ScriptRunner
2020
/// <remarks>
2121
/// Designed to be used in a manual installation without the requirement of starting a full NServiceBus endpoint.
2222
/// </remarks>
23+
[ObsoleteEx(
24+
Message = "Timeout Manager is being deprecated. See upgrade guide for guidance on migrating to transport native delayed delivery.",
25+
TreatAsErrorFromVersion = "7",
26+
RemoveInVersion = "8",
27+
ReplacementTypeOrMember = "Install(SqlDialect sqlDialect, string tablePrefix, Func<DbConnection> connectionBuilder, string scriptDirectory, bool shouldInstallOutbox, bool shouldInstallSagas, bool shouldInstallSubscriptions)")]
2328
public static Task Install(SqlDialect sqlDialect, string tablePrefix, Func<DbConnection> connectionBuilder, string scriptDirectory, bool shouldInstallOutbox = true, bool shouldInstallSagas = true, bool shouldInstallSubscriptions = true, bool shouldInstallTimeouts = true)
2429
{
2530
return Install(sqlDialect, tablePrefix, x => connectionBuilder(), scriptDirectory, shouldInstallOutbox, shouldInstallSagas, shouldInstallSubscriptions, shouldInstallTimeouts);
@@ -31,6 +36,11 @@ public static Task Install(SqlDialect sqlDialect, string tablePrefix, Func<DbCon
3136
/// <remarks>
3237
/// Designed to be used in a manual installation without the requirement of starting a full NServiceBus endpoint.
3338
/// </remarks>
39+
[ObsoleteEx(
40+
Message = "Timeout Manager is being deprecated. See upgrade guide for guidance on migrating to transport native delayed delivery.",
41+
TreatAsErrorFromVersion = "7",
42+
RemoveInVersion = "8",
43+
ReplacementTypeOrMember = "Install(SqlDialect sqlDialect, string tablePrefix, Func<Type, DbConnection> connectionBuilder, string scriptDirectory, bool shouldInstallOutbox, bool shouldInstallSagas, bool shouldInstallSubscriptions)")]
3444
public static async Task Install(SqlDialect sqlDialect, string tablePrefix, Func<Type, DbConnection> connectionBuilder, string scriptDirectory, bool shouldInstallOutbox = true, bool shouldInstallSagas = true, bool shouldInstallSubscriptions = true, bool shouldInstallTimeouts = true)
3545
{
3646
Guard.AgainstNull(nameof(sqlDialect), sqlDialect);

src/SqlPersistence/Timeout/Config/TimeoutSettings_Connection.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ namespace NServiceBus.Persistence.Sql
33
using System;
44
using System.Data.Common;
55

6+
[ObsoleteEx(
7+
Message = "Timeout Manager is being deprecated. See upgrade guide for guidance on migrating to transport native delayed delivery.",
8+
TreatAsErrorFromVersion = "7",
9+
RemoveInVersion = "8")]
610
public partial class TimeoutSettings
711
{
812
/// <summary>

0 commit comments

Comments
 (0)