Skip to content

Commit 2ef9192

Browse files
authored
Merge pull request #1348 from dotnet/dev/bartde/do_not_obsolete_things_you_dont_know
Keep some stuff around
2 parents 14873e7 + 49c2406 commit 2ef9192

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Rx.NET/Source/src/System.Reactive/Internal/PlatformEnlightenmentProvider.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,26 @@ public static class PlatformEnlightenmentProvider
3636
{
3737
private static IPlatformEnlightenmentProvider _current = CreatePlatformProvider();
3838

39+
//
40+
// NOTE TO MAINTAINERS
41+
//
42+
// Do *NOT* remove this mechanism which has been used beyond its original goal of supporting dependency injection when we were unifying
43+
// the different Rx implementations as one Portable Library with platform-specific PlatformServices assemblies on top. Besides this, it
44+
// has been used (and is still being used) for hosting scenarios where the host wants control over thread creation (cf. CAL), or other
45+
// services (e.g. interception of query operators for logging, debugging, quota management, policy injection, etc.). Compat matters and
46+
// lack thereof results in users getting stuck on older versions or having to resort to forking.
47+
//
48+
3949
/// <summary>
4050
/// (Infrastructure) Gets the current enlightenment provider. If none is loaded yet, accessing this property triggers provider resolution.
4151
/// </summary>
4252
/// <remarks>
4353
/// This member is used by the Rx infrastructure and not meant for public consumption or implementation.
4454
/// </remarks>
45-
[Obsolete("This mechanism will be removed in the next major version", false)]
4655
public static IPlatformEnlightenmentProvider Current
4756
{
4857
get => _current;
4958
set => _current = value ?? throw new ArgumentNullException(nameof(value));
50-
5159
}
5260

5361
private static IPlatformEnlightenmentProvider CreatePlatformProvider() => new CurrentPlatformEnlightenmentProvider();

Rx.NET/Source/tests/Tests.System.Reactive.ApiApprovals/Api/ApiApprovalTests.Core.verified.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2435,7 +2435,6 @@ public PeriodicTimerSystemClockMonitor(System.TimeSpan period) { }
24352435
}
24362436
public static class PlatformEnlightenmentProvider
24372437
{
2438-
[System.Obsolete("This mechanism will be removed in the next major version", false)]
24392438
public static System.Reactive.PlatformServices.IPlatformEnlightenmentProvider Current { get; set; }
24402439
}
24412440
public static class SystemClock

0 commit comments

Comments
 (0)