-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Refactor Props #5416
Refactor Props #5416
Changes from all commits
551857f
1cd6c39
f36a4e7
d2b2508
f22a29c
3d3452e
b9d6b07
8bb422b
07fc952
171a6bc
bf73061
71bac15
a47d581
af98f79
57d9c43
292ec8a
eb01377
c17b320
0c93b18
c5744a3
fcf18c2
0171d99
c6aa54c
5b0471a
62182ce
03151d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ public void Initialize(IDependencyResolver dependencyResolver) | |
/// <returns>A <see cref="Akka.Actor.Props"/> configuration object for the given actor type.</returns> | ||
public Props Props(Type actorType) | ||
{ | ||
return new Props(typeof(DIActorProducer), new object[] { dependencyResolver, actorType }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this was the only place where the old DIActorProducer got with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's true. Can mark that API for deletion in 1.5 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how do we mark deletion in version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct - just mention that in the |
||
return Akka.Actor.Props.CreateBy(new DIActorProducer(dependencyResolver, actorType), actorType); | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -897,7 +897,7 @@ namespace Akka.Actor | |
protected override void PreStart() { } | ||
protected override bool Receive(object message) { } | ||
} | ||
public class HashedWheelTimerScheduler : Akka.Actor.SchedulerBase, Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider, System.IDisposable | ||
public sealed class HashedWheelTimerScheduler : Akka.Actor.SchedulerBase, Akka.Actor.IDateTimeOffsetNowTimeProvider, Akka.Actor.ITimeProvider, System.IDisposable | ||
Zetanova marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
public HashedWheelTimerScheduler(Akka.Configuration.Config scheduler, Akka.Event.ILoggingAdapter log) { } | ||
public override System.TimeSpan HighResMonotonicClock { get; } | ||
|
@@ -1072,10 +1072,14 @@ namespace Akka.Actor | |
} | ||
public interface IIndirectActorProducer | ||
{ | ||
System.Type ActorType { get; } | ||
Akka.Actor.ActorBase Produce(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need to check to see if there are any instances of plugins that call this - I don't think so but I want to double check. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we're good |
||
Akka.Actor.ActorBase Produce(Akka.Actor.Props props); | ||
void Release(Akka.Actor.ActorBase actor); | ||
} | ||
[System.ObsoleteAttribute("Do not use this interface")] | ||
public interface IIndirectActorProducerWithActorType : Akka.Actor.IIndirectActorProducer | ||
{ | ||
System.Type ActorType { get; } | ||
} | ||
public interface IInternalActor | ||
{ | ||
Akka.Actor.IActorContext ActorContext { get; } | ||
|
@@ -1409,31 +1413,29 @@ namespace Akka.Actor | |
public System.Exception RestartException { get; } | ||
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } | ||
} | ||
public class Props : Akka.Util.ISurrogated, System.IEquatable<Akka.Actor.Props> | ||
public sealed class Props : Akka.Util.ISurrogated, System.IEquatable<Akka.Actor.Props> | ||
{ | ||
public static readonly Akka.Actor.Props None; | ||
protected Props() { } | ||
protected Props(Akka.Actor.Props copy) { } | ||
public Props(System.Type type, object[] args) { } | ||
public Props(System.Type type) { } | ||
public Props(System.Type type, Akka.Actor.SupervisorStrategy supervisorStrategy, System.Collections.Generic.IEnumerable<object> args) { } | ||
public Props(System.Type type, Akka.Actor.SupervisorStrategy supervisorStrategy, params object[] args) { } | ||
public Props(Akka.Actor.Deploy deploy, System.Type type, System.Collections.Generic.IEnumerable<object> args) { } | ||
public Props(Akka.Actor.Deploy deploy, System.Type type, params object[] args) { } | ||
public object[] Arguments { get; } | ||
public Akka.Actor.Deploy Deploy { get; set; } | ||
public Akka.Actor.Deploy Deploy { get; } | ||
[Newtonsoft.Json.JsonIgnoreAttribute()] | ||
public string Dispatcher { get; } | ||
public static Akka.Actor.Props Empty { get; } | ||
[Newtonsoft.Json.JsonIgnoreAttribute()] | ||
public string Mailbox { get; } | ||
[Newtonsoft.Json.JsonIgnoreAttribute()] | ||
public Akka.Routing.RouterConfig RouterConfig { get; } | ||
public Akka.Actor.SupervisorStrategy SupervisorStrategy { get; set; } | ||
public Akka.Actor.SupervisorStrategy SupervisorStrategy { get; } | ||
public static Akka.Actor.Props Terminated { get; } | ||
Zetanova marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[Newtonsoft.Json.JsonIgnoreAttribute()] | ||
public System.Type Type { get; } | ||
public string TypeName { get; } | ||
protected virtual Akka.Actor.Props Copy() { } | ||
public static Akka.Actor.Props Create<TActor>(System.Linq.Expressions.Expression<System.Func<TActor>> factory, Akka.Actor.SupervisorStrategy supervisorStrategy = null) | ||
where TActor : Akka.Actor.ActorBase { } | ||
public static Akka.Actor.Props Create<TActor>(params object[] args) | ||
|
@@ -1443,20 +1445,20 @@ namespace Akka.Actor | |
public static Akka.Actor.Props Create(System.Type type, params object[] args) { } | ||
[System.ObsoleteAttribute("Do not use this method. Call CreateBy(IIndirectActorProducer, params object[] arg" + | ||
"s) instead")] | ||
public static Akka.Actor.Props CreateBy<TProducer>(params object[] args) | ||
public static Akka.Actor.Props CreateBy<TProducer>(System.Type type, params object[] args) | ||
where TProducer : class, Akka.Actor.IIndirectActorProducer { } | ||
public static Akka.Actor.Props CreateBy(Akka.Actor.IIndirectActorProducer producer, params object[] args) { } | ||
public static Akka.Actor.Props CreateBy(Akka.Actor.IIndirectActorProducer producer, System.Type type, params object[] args) { } | ||
public bool Equals(Akka.Actor.Props other) { } | ||
public override bool Equals(object obj) { } | ||
public override int GetHashCode() { } | ||
public virtual Akka.Actor.ActorBase NewActor() { } | ||
public Akka.Actor.ActorBase NewActor() { } | ||
public Akka.Util.ISurrogate ToSurrogate(Akka.Actor.ActorSystem system) { } | ||
public Akka.Actor.Props WithDeploy(Akka.Actor.Deploy deploy) { } | ||
public Akka.Actor.Props WithDispatcher(string dispatcher) { } | ||
public Akka.Actor.Props WithMailbox(string mailbox) { } | ||
public Akka.Actor.Props WithRouter(Akka.Routing.RouterConfig routerConfig) { } | ||
public Akka.Actor.Props WithSupervisorStrategy(Akka.Actor.SupervisorStrategy supervisorStrategy) { } | ||
public class PropsSurrogate : Akka.Util.ISurrogate | ||
public sealed class PropsSurrogate : Akka.Util.ISurrogate | ||
{ | ||
public PropsSurrogate() { } | ||
public object[] Arguments { get; set; } | ||
|
@@ -1783,11 +1785,6 @@ namespace Akka.Actor | |
public override int GetHashCode() { } | ||
public override string ToString() { } | ||
} | ||
public class TerminatedProps : Akka.Actor.Props | ||
{ | ||
public TerminatedProps() { } | ||
public override Akka.Actor.ActorBase NewActor() { } | ||
} | ||
[System.ObsoleteAttribute("TypedActor in its current shape will be removed in v1.5")] | ||
public abstract class TypedActor : Akka.Actor.ActorBase | ||
{ | ||
|
@@ -5033,7 +5030,7 @@ namespace Akka.Util | |
protected Resolve() { } | ||
public abstract System.Type ActorType { get; } | ||
protected static Akka.Util.IResolver Resolver { get; } | ||
public abstract Akka.Actor.ActorBase Produce(); | ||
public abstract Akka.Actor.ActorBase Produce(Akka.Actor.Props props); | ||
public void Release(Akka.Actor.ActorBase actor) { } | ||
public static void SetResolver(Akka.Util.IResolver resolver) { } | ||
} | ||
|
@@ -5043,7 +5040,7 @@ namespace Akka.Util | |
public Resolve(params object[] args) { } | ||
public override System.Type ActorType { get; } | ||
public object[] Arguments { get; } | ||
public override Akka.Actor.ActorBase Produce() { } | ||
public override Akka.Actor.ActorBase Produce(Akka.Actor.Props props) { } | ||
} | ||
public class static Result | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to be more careful about inheritance checks here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of the deprecated DI library so I'm not as worried about it - but did we end up changing something here that we shouldn't have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I insert here only a safty check the
props.Type
and_actorType
should have the same type,because it's only copy