text: ﻿//-----------------------------------------------------------------------
  // <copyright file="IDependencyResolver.cs" company="Akka.NET Project">
  //     Copyright (C) 2009-2020 Lightbend Inc. <http://www.lightbend.com>
  //     Copyright (C) 2013-2020 .NET Foundation <https://github.com/akkadotnet/akka.net>
  // </copyright>
  //-----------------------------------------------------------------------
  
  using System;
  using Akka.Actor;
  
  namespace Akka.DI.Core
  {
      /// <summary>
      /// Defines services used by the <see cref="ActorSystem "/> extension system to create actors
      /// </summary>
      public interface IDependencyResolver
      {
          /// <summary>
          /// Retrieves an actor's type with the specified name
          /// </summary>
          /// <param name="actorName">The name of the actor to retrieve</param>
          /// <returns>The type with the specified actor name</returns>
          Type GetType(string actorName);
          /// <summary>
          /// Creates a delegate factory used to create actors based on their type
          /// </summary>
          /// <param name="actorType">The type of actor that the factory builds</param>
          /// <returns>A delegate factory used to create actors</returns>
          Func<ActorBase> CreateActorFactory(Type actorType);
          /// <summary>
          /// Used to register the configuration for an actor of the specified type <typeparamref name="TActor"/>
          /// </summary>
          /// <typeparam name="TActor">The type of actor the configuration is based</typeparam>
          /// <returns>The configuration object for the given actor type</returns>
          Props Create<TActor>() where TActor : ActorBase;
          /// <summary>
          /// Used to register the configuration for an actor of the specified type <paramref name="actorType"/> 
          /// </summary>
          /// <param name="actorType">The <see cref="Type"/> of actor the configuration is based</param>
          /// <returns>The configuration object for the given actor type</returns>
          Props Create(Type actorType);
          /// <summary>
          /// Signals the container to release it's reference to the actor.
          /// </summary>
          /// <param name="actor">The actor to remove from the container</param>
          void Release(ActorBase actor);
      }
  }
  
  