/// <summary> /// Initializes a new instance of the <see cref="Props" /> class. /// </summary> /// <param name="deploy">The configuration used to deploy the actor.</param> /// <param name="type">The type of the actor to create.</param> /// <param name="args">The arguments needed to create the actor.</param> /// <exception cref="ArgumentException">This exception is thrown if <paramref name="type"/> is an unknown actor producer.</exception> public Props(Deploy deploy, Type type, params object[] args) { Deploy = deploy; inputType = type; Arguments = args ?? noArgs; producer = CreateProducer(inputType, Arguments); }
/// <summary> /// Initializes a new instance of the <see cref="Props" /> class using a specified <see cref="IIndirectActorProducer"/>. /// </summary> /// <remarks> /// This API is meant for advanced use cases, such as Akka.DependencyInjection. /// </remarks> /// <param name="producer">The type of <see cref="IIndirectActorProducer"/> that will be used to instantiate <see cref="Type"/></param> /// <param name="deploy">The configuration used to deploy the actor.</param> /// <param name="strategy">The supervisor strategy to use.</param> /// <param name="args">The arguments needed to create the actor.</param> internal Props(IIndirectActorProducer producer, Deploy deploy, params object[] args) { Deploy = deploy; _inputType = producer.ActorType; Arguments = args ?? NoArgs; _producer = producer; }