Skip to content

Commit 5bde552

Browse files
authored
Revert "Deprecate IStartupTask and AddStartupTask with warnings (#9763)"
This reverts commit 1a1a8c1.
1 parent 0fe690e commit 5bde552

3 files changed

Lines changed: 1 addition & 8 deletions

File tree

src/Orleans.Runtime/Hosting/SiloBuilderStartupExtensions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public static class SiloBuilderStartupExtensions
2828
/// <returns>
2929
/// The provided <see cref="ISiloBuilder"/>.
3030
/// </returns>
31-
[Obsolete("AddStartupTask is deprecated. Use BackgroundService or IHostedService instead. See https://learn.microsoft.com/dotnet/orleans/host/configuration-guide/startup-tasks for more information.", error: false)]
3231
public static ISiloBuilder AddStartupTask<TStartup>(
3332
this ISiloBuilder builder,
3433
int stage = ServiceLifecycleStage.Active)
@@ -52,7 +51,6 @@ public static ISiloBuilder AddStartupTask<TStartup>(
5251
/// <returns>
5352
/// The provided <see cref="ISiloBuilder"/>.
5453
/// </returns>
55-
[Obsolete("AddStartupTask is deprecated. Use BackgroundService or IHostedService instead. See https://learn.microsoft.com/dotnet/orleans/host/configuration-guide/startup-tasks for more information.", error: false)]
5654
public static ISiloBuilder AddStartupTask(
5755
this ISiloBuilder builder,
5856
IStartupTask startupTask,
@@ -76,7 +74,6 @@ public static ISiloBuilder AddStartupTask(
7674
/// <returns>
7775
/// The provided <see cref="ISiloBuilder"/>.
7876
/// </returns>
79-
[Obsolete("AddStartupTask is deprecated. Use BackgroundService or IHostedService instead. See https://learn.microsoft.com/dotnet/orleans/host/configuration-guide/startup-tasks for more information.", error: false)]
8077
public static ISiloBuilder AddStartupTask(
8178
this ISiloBuilder builder,
8279
Func<IServiceProvider, CancellationToken, Task> startupTask,

src/Orleans.Runtime/Lifecycle/IStartupTask.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
using System;
2-
using System.Threading;
1+
using System.Threading;
32
using System.Threading.Tasks;
43

54
namespace Orleans.Runtime
65
{
76
/// <summary>
87
/// Defines an action to be taken after silo startup.
98
/// </summary>
10-
[Obsolete("IStartupTask is deprecated. Use BackgroundService or IHostedService instead. See https://learn.microsoft.com/dotnet/orleans/host/configuration-guide/startup-tasks for more information.", error: false)]
119
public interface IStartupTask
1210
{
1311
/// <summary>

test/Tester/StartupTaskTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
using Xunit;
1010

11-
#pragma warning disable CS0618 // Type or member is obsolete
12-
1311
namespace DefaultCluster.Tests
1412
{
1513
[TestCategory("BVT"), TestCategory("Lifecycle")]

0 commit comments

Comments
 (0)