PIbd22_NikiforovaMV_Automob.../AutomobilePlantContracts/DI/IDependencyContainer.cs
2024-06-22 22:32:20 +04:00

25 lines
669 B
C#
Raw 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 AutomobilePlantContracts.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>();
}
}