Namespace: MADE.App.Dependency
Defines an interface for a simple dependency service.
public interface ISimpleDependencyService| Platform | Version |
|---|---|
| .NET Standard | 2.0 |
| Xamarin.Android | 8.1 |
| Xamarin.iOS | 1.0 |
| UWP | 10.0.16299 |
Registers the given type.
void Register<TClass>() where TClass : class;Registers the given interface and associated type.
void Register<TInterface, TClass>()
where TInterface : class
where TClass : class, TInterface;Registers the given type with the given factory.
void Register<TClass>(Func<TClass> factory);The factory for creating instances of the given type.
Registers the given type with the given factory and associates it with the given key.
void Register<TClass>(string key, Func<TClass> factory);The key associated with the registration.
The factory for creating instances of the given type.
Gets an instance of the given service type that is registered.
TService GetInstance<TService>();A registered instance of the given service.
Gets an instance of the given service type that is registered.
TService GetInstance<TService>(string key);The key of the instance to retrieve.
A registered instance of the given service.
Checks whether the given type is registered with the service.
bool IsRegistered<T>();True if the type is registered; otherwise, false.
bool IsRegistered<T>(string key);The key of the instance to check is registered.
True if the type is registered; otherwise, false.