This repository has been archived on 2024-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
Sic06/FrameworkLocal/UIClient/Core/Container/IContainer.cs

21 lines
754 B
C#
Raw Normal View History

2023-01-13 10:57:37 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OpenSEMI.Core.Container
{
public interface IContainer : IServiceProvider
{
void Register<TService, TImplementation>() where TImplementation : TService;
void Register<TService, TImplementation>(bool singleton) where TImplementation : TService;
void Register<TService>(Type implementation, bool singleton);
void Register<TService>(Type implementation, Action<TService> callback, bool singleton);
void Register(Type service, Type implementation, bool singleton);
void Register<TService>(TService instance);
T Resolve<T>();
bool IsRegistered<T>();
}
}