Skip to content
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

Remove direct reference to Props in LocalActorRef #5556

Merged
Merged
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
6 changes: 2 additions & 4 deletions src/core/Akka/Actor/LocalActorRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace Akka.Actor
public class LocalActorRef : ActorRefWithCell, ILocalRef
{
private readonly ActorSystemImpl _system;
private readonly Props _props;
private readonly MessageDispatcher _dispatcher;
private readonly IInternalActorRef _supervisor;
private readonly ActorPath _path;
Expand Down Expand Up @@ -57,7 +56,6 @@ public LocalActorRef(ActorSystemImpl system, Props props, MessageDispatcher disp
IInternalActorRef supervisor, ActorPath path)
{
_system = system;
_props = props;
_dispatcher = dispatcher;
MailboxType = mailboxType;
_supervisor = supervisor;
Expand All @@ -74,7 +72,7 @@ public LocalActorRef(ActorSystemImpl system, Props props, MessageDispatcher disp
* object from another thread as soon as we run init.
*/
// ReSharper disable once VirtualMemberCallInConstructor
_cell = NewActorCell(_system, this, _props, _dispatcher,
_cell = NewActorCell(_system, this, props, _dispatcher,
_supervisor); // _cell needs to be assigned before Init is called.
_cell.Init(true, MailboxType);
}
Expand Down Expand Up @@ -168,7 +166,7 @@ public override ActorPath Path
/// <summary>
/// The <see cref="Props"/> used to create this actor.
/// </summary>
protected Props Props => _props;
protected Props Props => _cell.Props;

/// <summary>
/// The <see cref="MessageDispatcher"/> this actor will use to execute its message-processing.
Expand Down