26 lines
830 B
C#
Raw Normal View History

using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FurnitureAssemblyContracts.DI
{
// Интерфейс установки зависимости между элементами
public interface IDependencyContainer
{
2024-05-22 17:31:21 +04:00
// Регистрация логгера
void AddLogging(Action<ILoggingBuilder> configure);
2024-05-22 17:31:21 +04:00
// Добавление зависимости
void RegisterType<T, U>(bool isSingle) where U : class, T where T : class;
2024-05-22 17:31:21 +04:00
// Добавление зависимости
void RegisterType<T>(bool isSingle) where T : class;
2024-05-22 17:31:21 +04:00
// Получение класса со всеми зависимостями
T Resolve<T>();
}
}