Skip to content

[Obsolete] GetFirstAttribute #6624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/core/Akka.Streams.Tests/Dsl/AttributesSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ public async Task Attributes_must_keep_the_outermost_attribute_as_the_least_spec

[Fact]
public void Attributes_must_give_access_to_first_attribute()
#pragma warning disable CS0618 // Type or member is obsolete
=> Attributes.GetFirstAttribute<Attributes.Name>().Value.Should().Be("a");
#pragma warning restore CS0618 // Type or member is obsolete

[Fact]
public void Attributes_must_give_access_to_attribute_by_type()
Expand Down
4 changes: 2 additions & 2 deletions src/core/Akka.Streams.Tests/Dsl/BidiFlowSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ public void A_BidiFlow_must_suitably_override_attribute_handling_methods()
var b = (BidiFlow<int, long, ByteString, string, NotUsed>)
Bidi().WithAttributes(Attributes.CreateName("")).Async().Named("name");

b.Module.Attributes.GetFirstAttribute<Attributes.Name>().Value.Should().Be("name");
b.Module.Attributes.GetFirstAttribute<Attributes.AsyncBoundary>()
b.Module.Attributes.GetAttribute<Attributes.Name>().Value.Should().Be("name");
b.Module.Attributes.GetAttribute<Attributes.AsyncBoundary>()
.Should()
.Be(Attributes.AsyncBoundary.Instance);
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/Akka.Streams.Tests/Dsl/GraphDslCompileSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ public void A_Graph_should_suitably_override_attribute_handling_methods()
return new FlowShape<int, int>(id.Inlet, id.Outlet);
}).Async().AddAttributes(Attributes.None).Named("useless");

ga.Module.Attributes.GetFirstAttribute<Attributes.Name>().Value.Should().Be("useless");
ga.Module.Attributes.GetFirstAttribute<Attributes.AsyncBoundary>()
ga.Module.Attributes.GetAttribute<Attributes.Name>().Value.Should().Be("useless");
ga.Module.Attributes.GetAttribute<Attributes.AsyncBoundary>()
.Should()
.Be(Attributes.AsyncBoundary.Instance);
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/Akka.Streams.Tests/Dsl/RunnableGraphSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public void A_RunnableGraph_must_suitably_override_attribute_handling_methods()
.AddAttributes(Attributes.None)
.Named("useless");

r.Module.Attributes.GetFirstAttribute<Attributes.Name>().Value.Should().Be("useless");
r.Module.Attributes.GetFirstAttribute<Attributes.AsyncBoundary>()
r.Module.Attributes.GetAttribute<Attributes.Name>().Value.Should().Be("useless");
r.Module.Attributes.GetAttribute<Attributes.AsyncBoundary>()
.Should()
.Be(Attributes.AsyncBoundary.Instance);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Streams.Tests/Dsl/SinkSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void A_Sink_must_suitably_override_attribute_handling_methods()
var s = Sink.First<int>().Async().AddAttributes(Attributes.None).Named("name");

s.Module.Attributes.GetAttribute<Attributes.Name>().Value.Should().Be("name");
s.Module.Attributes.GetFirstAttribute<Attributes.AsyncBoundary>()
s.Module.Attributes.GetAttribute<Attributes.AsyncBoundary>()
.Should()
.Be(Attributes.AsyncBoundary.Instance);
}
Expand Down