Skip to content

Commit 90d6349

Browse files
authored
[CS0618] AbstractStage Warning Disable (#6672)
1 parent 29b1513 commit 90d6349

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/core/Akka.Streams/Stage/AbstractStage.cs

+16
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ namespace Akka.Streams.Stage
1818
/// <typeparam name="TOut">TBD</typeparam>
1919
internal class PushPullGraphLogic<TIn, TOut> : GraphStageLogic, IDetachedContext<TOut>
2020
{
21+
#pragma warning disable CS0618 // Type or member is obsolete
2122
private AbstractStage<TIn, TOut> _currentStage;
23+
#pragma warning restore CS0618 // Type or member is obsolete
2224
private readonly FlowShape<TIn, TOut> _shape;
2325

2426
/// <summary>
@@ -30,7 +32,9 @@ internal class PushPullGraphLogic<TIn, TOut> : GraphStageLogic, IDetachedContext
3032
public PushPullGraphLogic(
3133
FlowShape<TIn, TOut> shape,
3234
Attributes attributes,
35+
#pragma warning disable CS0618 // Type or member is obsolete
3336
AbstractStage<TIn, TOut> stage)
37+
#pragma warning restore CS0618 // Type or member is obsolete
3438
: base(shape)
3539
{
3640
Attributes = attributes;
@@ -59,7 +63,9 @@ public PushPullGraphLogic(
5963
/// <summary>
6064
/// TBD
6165
/// </summary>
66+
#pragma warning disable CS0618 // Type or member is obsolete
6267
public AbstractStage<TIn, TOut> Stage { get; }
68+
#pragma warning restore CS0618 // Type or member is obsolete
6369

6470
IMaterializer ILifecycleContext.Materializer => Materializer;
6571

@@ -283,7 +289,9 @@ private void OnSupervision(Exception exception)
283289
case Directive.Restart:
284290
ResetAfterSupervise();
285291
_currentStage.PostStop();
292+
#pragma warning disable CS0618 // Type or member is obsolete
286293
_currentStage = (AbstractStage<TIn, TOut>)_currentStage.Restart();
294+
#pragma warning restore CS0618 // Type or member is obsolete
287295
_currentStage.PreStart(Context);
288296
break;
289297
default:
@@ -316,14 +324,18 @@ public class PushPullGraphStageWithMaterializedValue<TIn, TOut, TMat> : GraphSta
316324
/// <summary>
317325
/// TBD
318326
/// </summary>
327+
#pragma warning disable CS0618 // Type or member is obsolete
319328
public readonly Func<Attributes, (IStage<TIn, TOut>, TMat)> Factory;
329+
#pragma warning restore CS0618 // Type or member is obsolete
320330

321331
/// <summary>
322332
/// TBD
323333
/// </summary>
324334
/// <param name="factory">TBD</param>
325335
/// <param name="stageAttributes">TBD</param>
336+
#pragma warning disable CS0618 // Type or member is obsolete
326337
public PushPullGraphStageWithMaterializedValue(Func<Attributes, (IStage<TIn, TOut>, TMat)> factory, Attributes stageAttributes)
338+
#pragma warning restore CS0618 // Type or member is obsolete
327339
{
328340
InitialAttributes = stageAttributes;
329341
Factory = factory;
@@ -350,10 +362,12 @@ public PushPullGraphStageWithMaterializedValue(Func<Attributes, (IStage<TIn, TOu
350362
public override ILogicAndMaterializedValue<TMat> CreateLogicAndMaterializedValue(Attributes inheritedAttributes)
351363
{
352364
var stageAndMat = Factory(inheritedAttributes);
365+
#pragma warning disable CS0618 // Type or member is obsolete
353366
return
354367
new LogicAndMaterializedValue<TMat>(
355368
new PushPullGraphLogic<TIn, TOut>(Shape, inheritedAttributes,
356369
(AbstractStage<TIn, TOut>) stageAndMat.Item1), stageAndMat.Item2);
370+
#pragma warning restore CS0618 // Type or member is obsolete
357371
}
358372

359373
/// <summary>
@@ -376,7 +390,9 @@ public class PushPullGraphStage<TIn, TOut> : PushPullGraphStageWithMaterializedV
376390
/// <param name="factory">TBD</param>
377391
/// <param name="stageAttributes">TBD</param>
378392
/// <returns>TBD</returns>
393+
#pragma warning disable CS0618 // Type or member is obsolete
379394
public PushPullGraphStage(Func<Attributes, IStage<TIn, TOut>> factory, Attributes stageAttributes) : base(attributes => (factory(attributes), NotUsed.Instance), stageAttributes)
395+
#pragma warning restore CS0618 // Type or member is obsolete
380396
{
381397
}
382398
}

0 commit comments

Comments
 (0)