Skip to content

Commit 6bd6323

Browse files
Fix obsolete (#7573)
Co-authored-by: Daniel Marbach <danielmarbach@users.noreply.github.com>
1 parent 9b5f3ae commit 6bd6323

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/NServiceBus.Core.Tests/ApprovalFiles/APIApprovals.ApproveNServiceBus.approved.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,13 +1426,9 @@ namespace NServiceBus.Features
14261426
{
14271427
public static void EnableFeature<TFeature>(this NServiceBus.Settings.SettingsHolder settings)
14281428
where TFeature : NServiceBus.Features.Feature, new () { }
1429-
[System.Obsolete("It is no longer possible to enable features by default on the settings. Features " +
1430-
"can enable other features by calling EnableByDefault<T> in the constructor. Will" +
1431-
" be removed in version 11.0.0.", true)]
1429+
[System.Obsolete(@"It is no longer possible to enable features by default on the settings. Features can enable other features by calling Enable<T> in the constructor. Enabling a feature outside the context of another feature can be done by calling EnableFeature<T> on the endpoint configuration or settings. Will be removed in version 11.0.0.", true)]
14321430
public static NServiceBus.Settings.SettingsHolder EnableFeatureByDefault(this NServiceBus.Settings.SettingsHolder settings, System.Type featureType) { }
1433-
[System.Obsolete("It is no longer possible to enable features by default on the settings. Features " +
1434-
"can enable other features by calling EnableByDefault<T> in the constructor. Will" +
1435-
" be removed in version 11.0.0.", true)]
1431+
[System.Obsolete(@"It is no longer possible to enable features by default on the settings. Features can enable other features by calling Enable<T> in the constructor. Enabling a feature outside the context of another feature can be done by calling EnableFeature<T> on the endpoint configuration or settings. Will be removed in version 11.0.0.", true)]
14361432
public static NServiceBus.Settings.SettingsHolder EnableFeatureByDefault<T>(this NServiceBus.Settings.SettingsHolder settings)
14371433
where T : NServiceBus.Features.Feature { }
14381434
[System.Obsolete("Use \'IsFeatureActive<T>(this IReadOnlySettings settings)\' instead. Will be remove" +

src/NServiceBus.Core/obsoletes-v10.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,17 +460,17 @@ public class DataBus;
460460
public static partial class SettingsExtensions
461461
{
462462
[ObsoleteMetadata(
463-
Message = "It is no longer possible to enable features by default on the settings. Features can enable other features by calling EnableByDefault<T> in the constructor",
463+
Message = "It is no longer possible to enable features by default on the settings. Features can enable other features by calling Enable<T> in the constructor. Enabling a feature outside the context of another feature can be done by calling EnableFeature<T> on the endpoint configuration or settings",
464464
RemoveInVersion = "11",
465465
TreatAsErrorFromVersion = "10")]
466-
[Obsolete("It is no longer possible to enable features by default on the settings. Features can enable other features by calling EnableByDefault<T> in the constructor. Will be removed in version 11.0.0.", true)]
466+
[Obsolete("It is no longer possible to enable features by default on the settings. Features can enable other features by calling Enable<T> in the constructor. Enabling a feature outside the context of another feature can be done by calling EnableFeature<T> on the endpoint configuration or settings. Will be removed in version 11.0.0.", true)]
467467
public static SettingsHolder EnableFeatureByDefault<T>(this SettingsHolder settings) where T : Feature => throw new NotImplementedException();
468468

469469
[ObsoleteMetadata(
470-
Message = "It is no longer possible to enable features by default on the settings. Features can enable other features by calling EnableByDefault<T> in the constructor",
470+
Message = "It is no longer possible to enable features by default on the settings. Features can enable other features by calling Enable<T> in the constructor. Enabling a feature outside the context of another feature can be done by calling EnableFeature<T> on the endpoint configuration or settings",
471471
RemoveInVersion = "11",
472472
TreatAsErrorFromVersion = "10")]
473-
[Obsolete("It is no longer possible to enable features by default on the settings. Features can enable other features by calling EnableByDefault<T> in the constructor. Will be removed in version 11.0.0.", true)]
473+
[Obsolete("It is no longer possible to enable features by default on the settings. Features can enable other features by calling Enable<T> in the constructor. Enabling a feature outside the context of another feature can be done by calling EnableFeature<T> on the endpoint configuration or settings. Will be removed in version 11.0.0.", true)]
474474
public static SettingsHolder EnableFeatureByDefault(this SettingsHolder settings, Type featureType) => throw new NotImplementedException();
475475

476476
[ObsoleteMetadata(

0 commit comments

Comments
 (0)