DepartmentProject/DepartmentPortal/Common/ToolsModule/ManagmentDependency/IDependencyManager.cs

38 lines
977 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 System;
namespace ToolsModule.ManagmentDependency
{
/// <summary>
/// Интерфейс установки зависмости между элементами
/// </summary>
public interface IDependencyManager
{
/// <summary>
/// Добавление зависимости
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="U"></typeparam>
void RegisterType<T, U>() where U : T;
/// <summary>
/// Добавление зависимости
/// </summary>
/// <typeparam name="T"></typeparam>
void RegisterType<T>();
/// <summary>
/// Получение класса со всеми зависмостями
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
T Resolve<T>();
/// <summary>
/// Получение класса со всеми зависмостями
/// </summary>
/// <param name="t"></param>
/// <returns></returns>
object Resolve(Type t);
}
}