From 1bca26836b93718c22a70c20faefa6b3e3d223de Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Wed, 5 Oct 2022 10:03:38 -0500 Subject: [PATCH 1/4] convert `Envelope` back into a reference type --- src/core/Akka/Actor/Message.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Akka/Actor/Message.cs b/src/core/Akka/Actor/Message.cs index 2099133db87..8c5e253cc10 100644 --- a/src/core/Akka/Actor/Message.cs +++ b/src/core/Akka/Actor/Message.cs @@ -12,7 +12,7 @@ namespace Akka.Actor /// /// Envelope class, represents a message and the sender of the message. /// - public struct Envelope + public sealed class Envelope { /// /// Initializes a new instance of the struct. @@ -44,13 +44,13 @@ public Envelope(object message, IActorRef sender) /// Gets or sets the sender. /// /// The sender. - public IActorRef Sender { get; private set; } + public IActorRef Sender { get; } /// /// Gets or sets the message. /// /// The message. - public object Message { get; private set; } + public object Message { get; } /// /// Converts the to a string representation. From 810705e4dabac83722eb6957bd7a2ea5a4d70224 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Wed, 5 Oct 2022 10:35:38 -0500 Subject: [PATCH 2/4] approved API changes --- src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt b/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt index 3e3a0702e48..cf37ab02a54 100644 --- a/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt +++ b/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt @@ -686,7 +686,7 @@ namespace Akka.Actor protected virtual bool SpecialHandle(object message, Akka.Actor.IActorRef sender) { } protected override void TellInternal(object message, Akka.Actor.IActorRef sender) { } } - public struct Envelope + public sealed class Envelope { public Envelope(object message, Akka.Actor.IActorRef sender, Akka.Actor.ActorSystem system) { } public Envelope(object message, Akka.Actor.IActorRef sender) { } From 6d5c806b90344656b580f029edf367039b10c5a1 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Thu, 6 Oct 2022 11:30:57 -0500 Subject: [PATCH 3/4] changed to `readonly struct` --- src/core/Akka/Actor/Message.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Akka/Actor/Message.cs b/src/core/Akka/Actor/Message.cs index 8c5e253cc10..b7ab5482435 100644 --- a/src/core/Akka/Actor/Message.cs +++ b/src/core/Akka/Actor/Message.cs @@ -12,7 +12,7 @@ namespace Akka.Actor /// /// Envelope class, represents a message and the sender of the message. /// - public sealed class Envelope + public readonly struct Envelope { /// /// Initializes a new instance of the struct. From 047500453fa22798b255e6ecfb41bdff25929711 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Thu, 6 Oct 2022 12:11:41 -0500 Subject: [PATCH 4/4] fixed API approvals --- src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt b/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt index cf37ab02a54..3e3a0702e48 100644 --- a/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt +++ b/src/core/Akka.API.Tests/CoreAPISpec.ApproveCore.verified.txt @@ -686,7 +686,7 @@ namespace Akka.Actor protected virtual bool SpecialHandle(object message, Akka.Actor.IActorRef sender) { } protected override void TellInternal(object message, Akka.Actor.IActorRef sender) { } } - public sealed class Envelope + public struct Envelope { public Envelope(object message, Akka.Actor.IActorRef sender, Akka.Actor.ActorSystem system) { } public Envelope(object message, Akka.Actor.IActorRef sender) { }