public IAgent GetAgentFor(Type actorType) { return(Agents.ReadOrWrite(actorType, () => AgentFactory.GetAgentFor(actorType))); }
public IAgent <TActor> GetAgentFor <TActor>() where TActor : class { var actorType = typeof(TActor); return(Agents.ReadOrWrite(actorType, () => AgentFactory.GetAgentFor <TActor>()) as IAgent <TActor>); }