Skip to content

Commit

Permalink
Rename IndirectActorProducer > IIndirectActorProducer
Browse files Browse the repository at this point in the history
  • Loading branch information
HCanber committed Mar 31, 2015
1 parent c9bc407 commit 1c4e8fe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Akka.DI.Core
/// <summary>
/// Dependency Injection Backed IndirectActorProducer
/// </summary>
public class DIActorProducer : IndirectActorProducer
public class DIActorProducer : IIndirectActorProducer
{
private IDependencyResolver dependencyResolver;
private string actorName;
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Tests/Actor/PropsSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void Props_must_create_actor_by_producer()
latchActor.Ready(TimeSpan.FromSeconds(1));
}

private class TestProducer : IndirectActorProducer
private class TestProducer : IIndirectActorProducer
{
TestLatch latchActor;

Expand Down
20 changes: 10 additions & 10 deletions src/core/Akka/Actor/Props.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public override int GetHashCode()
/// <summary>
/// The default producer
/// </summary>
private static readonly IndirectActorProducer defaultProducer = new DefaultProducer();
private static readonly IIndirectActorProducer defaultProducer = new DefaultProducer();

/// <summary>
/// The intern type of the actor or the producer
Expand All @@ -150,7 +150,7 @@ public override int GetHashCode()
/// <summary>
/// The producer of the actor
/// </summary>
private IndirectActorProducer producer;
private IIndirectActorProducer producer;

/// <summary>
/// Initializes a new instance of the <see cref="Props" /> class.
Expand Down Expand Up @@ -361,7 +361,7 @@ public static Props Create<TActor>(params object[] args) where TActor : ActorBas
/// <typeparam name="TProducer">The type of the actor producer</typeparam>
/// <param name="args">The arguments</param>
/// <returns>Props</returns>
public static Props CreateBy<TProducer>(params object[] args) where TProducer : class, IndirectActorProducer
public static Props CreateBy<TProducer>(params object[] args) where TProducer : class, IIndirectActorProducer
{
return new Props(typeof(TProducer), args);
}
Expand Down Expand Up @@ -512,7 +512,7 @@ protected override void OnReceive(object message)
}
}

private class DefaultProducer : IndirectActorProducer
private class DefaultProducer : IIndirectActorProducer
{
public ActorBase Produce()
{
Expand All @@ -525,7 +525,7 @@ public Type ActorType
}
}

private class ActivatorProducer : IndirectActorProducer
private class ActivatorProducer : IIndirectActorProducer
{
private readonly Type _actorType;
private readonly object[] _args;
Expand All @@ -547,7 +547,7 @@ public Type ActorType
}
}

private class FactoryConsumer<TActor> : IndirectActorProducer where TActor : ActorBase
private class FactoryConsumer<TActor> : IIndirectActorProducer where TActor : ActorBase
{
private readonly Func<TActor> _factory;

Expand All @@ -569,13 +569,13 @@ public Type ActorType

#endregion

private static IndirectActorProducer CreateProducer(Type type, object[] args)
private static IIndirectActorProducer CreateProducer(Type type, object[] args)
{
if (type == null) {
return defaultProducer;
}
if (typeof(IndirectActorProducer).IsAssignableFrom(type)) {
return Activator.CreateInstance(type, args).AsInstanceOf<IndirectActorProducer>();
if (typeof(IIndirectActorProducer).IsAssignableFrom(type)) {
return Activator.CreateInstance(type, args).AsInstanceOf<IIndirectActorProducer>();
}
if (typeof(ActorBase).IsAssignableFrom(type)) {
return new ActivatorProducer(type, args);
Expand Down Expand Up @@ -657,7 +657,7 @@ protected override Props Copy()
/// subclass. It can be used to allow a dependency injection framework to
/// determine the actual actor class and how it shall be instantiated.
/// </summary>
public interface IndirectActorProducer
public interface IIndirectActorProducer
{
/// <summary>
/// This factory method must produce a fresh actor instance upon each
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka/Util/Resolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public interface IResolver
T Resolve<T>(object[] args);
}

public abstract class Resolve : IndirectActorProducer
public abstract class Resolve : IIndirectActorProducer
{
public abstract ActorBase Produce();
public abstract Type ActorType { get; }
Expand Down

0 comments on commit 1c4e8fe

Please sign in to comment.