using Microsoft.Extensions.Logging;

namespace FishFactoryContracts.DI
{
    public interface IDependencyContainer
    {
        /// <summary>
        /// Регистрация логгера
        /// </summary>
        /// <param name="configure"></param>
        void AddLogging(Action<ILoggingBuilder> configure);

        /// <summary>
        /// Добавление зависимости
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <typeparam name="U"></typeparam>
        /// <param name="isSingle"></param>
        void RegisterType<T, U>(bool isSingle) where U : class, T where T : class;

        /// <summary>
        /// Добавление зависимости
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="isSingle"></param>
        void RegisterType<T>(bool isSingle) where T : class;

        /// <summary>
        /// Получение класса со всеми зависимостями
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        T Resolve<T>();
    }
}