PIbd-22_Smirnov_A.A._Securi.../SecuritySystem/SecuritySystemContracts/DI/IDependencyContainer.cs
2024-06-22 10:36:54 +04:00

27 lines
826 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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