Skip to content

Commit 4b19cd1

Browse files
authored
[CS0618] GraphDslCompileSpec - Warning Disable (#6680)
1 parent 502370e commit 4b19cd1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/core/Akka.Streams.Tests/Dsl/GraphDslCompileSpec.cs

+18
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,46 @@ private class Apple : IFruit
4444

4545
}
4646

47+
#pragma warning disable CS0618 // Type or member is obsolete
4748
private sealed class OpStage<TIn, TOut> : PushStage<TIn, TOut> where TIn : TOut
49+
#pragma warning restore CS0618 // Type or member is obsolete
4850
{
4951
public override ISyncDirective OnPush(TIn element, IContext<TOut> context)
5052
{
5153
return context.Push(element);
5254
}
5355
}
5456

57+
#pragma warning disable CS0618 // Type or member is obsolete
5558
private static IStage<TIn, TOut> Op<TIn, TOut>() where TIn : TOut => new OpStage<TIn, TOut>();
59+
#pragma warning restore CS0618 // Type or member is obsolete
5660

5761
private static IEnumerator<Apple> Apples() => Enumerable.Repeat(new Apple(), int.MaxValue).GetEnumerator();
5862

5963
private static Flow<string, string, NotUsed> F1
64+
#pragma warning disable CS0618 // Type or member is obsolete
6065
=> Flow.Create<string>().Transform(Op<string, string>).Named("F1");
66+
#pragma warning restore CS0618 // Type or member is obsolete
6167
private static Flow<string, string, NotUsed> F2
68+
#pragma warning disable CS0618 // Type or member is obsolete
6269
=> Flow.Create<string>().Transform(Op<string, string>).Named("F2");
70+
#pragma warning restore CS0618 // Type or member is obsolete
6371
private static Flow<string, string, NotUsed> F3
72+
#pragma warning disable CS0618 // Type or member is obsolete
6473
=> Flow.Create<string>().Transform(Op<string, string>).Named("F3");
74+
#pragma warning restore CS0618 // Type or member is obsolete
6575
private static Flow<string, string, NotUsed> F4
76+
#pragma warning disable CS0618 // Type or member is obsolete
6677
=> Flow.Create<string>().Transform(Op<string, string>).Named("F4");
78+
#pragma warning restore CS0618 // Type or member is obsolete
6779
private static Flow<string, string, NotUsed> F5
80+
#pragma warning disable CS0618 // Type or member is obsolete
6881
=> Flow.Create<string>().Transform(Op<string, string>).Named("F5");
82+
#pragma warning restore CS0618 // Type or member is obsolete
6983
private static Flow<string, string, NotUsed> F6
84+
#pragma warning disable CS0618 // Type or member is obsolete
7085
=> Flow.Create<string>().Transform(Op<string, string>).Named("F6");
86+
#pragma warning restore CS0618 // Type or member is obsolete
7187

7288
private static Source<string, NotUsed> In1 => Source.From(new[] { "a", "b", "c" });
7389
private static Source<string, NotUsed> In2 => Source.From(new[] { "d", "e", "f" });
@@ -227,8 +243,10 @@ public void A_Graph_should_build_wikipedia_Topological_sorting()
227243
var out2 = Sink.AsPublisher<string>(false).MapMaterializedValue(_ => NotUsed.Instance);
228244
var out9 = Sink.AsPublisher<string>(false).MapMaterializedValue(_ => NotUsed.Instance);
229245
var out10 = Sink.AsPublisher<string>(false).MapMaterializedValue(_ => NotUsed.Instance);
246+
#pragma warning disable CS0618 // Type or member is obsolete
230247
Func<string, Flow<string, string, NotUsed>> f =
231248
s => Flow.Create<string>().Transform(Op<string, string>).Named(s);
249+
#pragma warning restore CS0618 // Type or member is obsolete
232250

233251
b.From(in7).Via(f("a")).Via(b7).Via(f("b")).Via(m11).Via(f("c")).Via(b11).Via(f("d")).To(out2);
234252
b.From(b11).Via(f("e")).Via(m9).Via(f("f")).To(out9);

0 commit comments

Comments
 (0)