diff --git a/src/core/Akka.Streams/Stage/AbstractStage.cs b/src/core/Akka.Streams/Stage/AbstractStage.cs index dc6ce8708c7..b20c11f9d61 100644 --- a/src/core/Akka.Streams/Stage/AbstractStage.cs +++ b/src/core/Akka.Streams/Stage/AbstractStage.cs @@ -18,7 +18,9 @@ namespace Akka.Streams.Stage /// TBD internal class PushPullGraphLogic : GraphStageLogic, IDetachedContext { +#pragma warning disable CS0618 // Type or member is obsolete private AbstractStage _currentStage; +#pragma warning restore CS0618 // Type or member is obsolete private readonly FlowShape _shape; /// @@ -30,7 +32,9 @@ internal class PushPullGraphLogic : GraphStageLogic, IDetachedContext public PushPullGraphLogic( FlowShape shape, Attributes attributes, +#pragma warning disable CS0618 // Type or member is obsolete AbstractStage stage) +#pragma warning restore CS0618 // Type or member is obsolete : base(shape) { Attributes = attributes; @@ -59,7 +63,9 @@ public PushPullGraphLogic( /// /// TBD /// +#pragma warning disable CS0618 // Type or member is obsolete public AbstractStage Stage { get; } +#pragma warning restore CS0618 // Type or member is obsolete IMaterializer ILifecycleContext.Materializer => Materializer; @@ -283,7 +289,9 @@ private void OnSupervision(Exception exception) case Directive.Restart: ResetAfterSupervise(); _currentStage.PostStop(); +#pragma warning disable CS0618 // Type or member is obsolete _currentStage = (AbstractStage)_currentStage.Restart(); +#pragma warning restore CS0618 // Type or member is obsolete _currentStage.PreStart(Context); break; default: @@ -316,14 +324,18 @@ public class PushPullGraphStageWithMaterializedValue : GraphSta /// /// TBD /// +#pragma warning disable CS0618 // Type or member is obsolete public readonly Func, TMat)> Factory; +#pragma warning restore CS0618 // Type or member is obsolete /// /// TBD /// /// TBD /// TBD +#pragma warning disable CS0618 // Type or member is obsolete public PushPullGraphStageWithMaterializedValue(Func, TMat)> factory, Attributes stageAttributes) +#pragma warning restore CS0618 // Type or member is obsolete { InitialAttributes = stageAttributes; Factory = factory; @@ -350,10 +362,12 @@ public PushPullGraphStageWithMaterializedValue(Func CreateLogicAndMaterializedValue(Attributes inheritedAttributes) { var stageAndMat = Factory(inheritedAttributes); +#pragma warning disable CS0618 // Type or member is obsolete return new LogicAndMaterializedValue( new PushPullGraphLogic(Shape, inheritedAttributes, (AbstractStage) stageAndMat.Item1), stageAndMat.Item2); +#pragma warning restore CS0618 // Type or member is obsolete } /// @@ -376,7 +390,9 @@ public class PushPullGraphStage : PushPullGraphStageWithMaterializedV /// TBD /// TBD /// TBD +#pragma warning disable CS0618 // Type or member is obsolete public PushPullGraphStage(Func> factory, Attributes stageAttributes) : base(attributes => (factory(attributes), NotUsed.Instance), stageAttributes) +#pragma warning restore CS0618 // Type or member is obsolete { } }