diff --git a/Source/Euonia.Modularity/Dependency/ILazyServiceProvider.cs b/Source/Euonia.Modularity/Dependency/ILazyServiceProvider.cs
index 6d24b3a..8ec6a0e 100644
--- a/Source/Euonia.Modularity/Dependency/ILazyServiceProvider.cs
+++ b/Source/Euonia.Modularity/Dependency/ILazyServiceProvider.cs
@@ -5,63 +5,131 @@
///
public interface ILazyServiceProvider
{
- ///
- ///
- ///
- ///
- ///
- T GetRequiredService();
-
- ///
- ///
- ///
- ///
- ///
- object GetRequiredService(Type serviceType);
-
- ///
- ///
- ///
- ///
- ///
- T GetService();
-
- ///
- ///
- ///
- ///
- ///
- object GetService(Type serviceType);
-
- ///
- ///
- ///
- ///
- ///
- ///
- T GetService(T defaultValue);
-
- ///
- ///
- ///
- ///
- ///
- ///
- object GetService(Type serviceType, object defaultValue);
-
- ///
- ///
- ///
- ///
- ///
- ///
- object GetService(Type serviceType, Func factory);
-
- ///
- ///
- ///
- ///
- ///
- ///
- T GetService(Func factory);
+ ///
+ /// Get service of type from the .
+ ///
+ /// The type of service object to get.
+ ///
+ T GetRequiredService();
+
+ ///
+ /// Get service of type from the .
+ ///
+ ///
+ ///
+ object GetRequiredService(Type serviceType);
+
+ ///
+ /// Get service of type from the .
+ ///
+ /// The type of service object to get.
+ ///
+ T GetService();
+
+ ///
+ /// Get service of type from the .
+ ///
+ ///
+ ///
+ object GetService(Type serviceType);
+
+ ///
+ /// Get service of type from the .
+ ///
+ ///
+ /// The type of service object to get.
+ ///
+ T GetService(T defaultValue);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ object GetService(Type serviceType, object defaultValue);
+
+ ///
+ /// Get service of from the .
+ ///
+ ///
+ ///
+ ///
+ object GetService(Type serviceType, Func factory);
+
+ ///
+ /// Get service of type from the .
+ ///
+ ///
+ /// The type of service object to get.
+ ///
+ T GetService(Func factory);
+
+ ///
+ /// Get service of from the .
+ ///
+ /// An object that specifies the type of service object to get.
+ /// An object that specifies the key of service object to get.
+ ///
+ object GetKeyedService(Type serviceType, object serviceKey);
+
+ ///
+ /// Get service of type from the .
+ ///
+ /// The type of service object to get.
+ /// An object that specifies the key of service object to get.
+ ///
+ T GetRequiredKeyedService(object serviceKey);
+
+ ///
+ /// Get service of type from the .
+ ///
+ /// The type of service object to get.
+ /// An object that specifies the key of service object to get.
+ ///
+ T GetKeyedService(object serviceKey);
+
+ ///
+ /// Get service of type from the .
+ ///
+ ///
+ /// An object that specifies the key of service object to get.
+ ///
+ object GetRequiredKeyedService(Type serviceType, object serviceKey);
+
+ ///
+ /// Get service of type from the .
+ ///
+ /// The type of service object to get.
+ /// An object that specifies the key of service object to get.
+ ///
+ ///
+ T GetKeyedService(object serviceKey, T defaultValue);
+
+ ///
+ /// Get service of type from the .
+ ///
+ /// The type of service object to get.
+ /// An object that specifies the key of service object to get.
+ ///
+ ///
+ T GetKeyedService(object serviceKey, Func factory);
+
+ ///
+ /// Get service of type from the .
+ ///
+ ///
+ /// An object that specifies the key of service object to get.
+ ///
+ ///
+ object GetKeyedService(Type serviceType, object serviceKey, Func factory);
+
+ ///
+ /// Get service of type from the .
+ ///
+ ///
+ /// An object that specifies the key of service object to get.
+ ///
+ ///
+ object GetKeyedService(Type serviceType, object serviceKey, object defaultValue);
}
\ No newline at end of file
diff --git a/Source/Euonia.Modularity/Dependency/LazyServiceProvider.Keyed.cs b/Source/Euonia.Modularity/Dependency/LazyServiceProvider.Keyed.cs
new file mode 100644
index 0000000..d1f7ee4
--- /dev/null
+++ b/Source/Euonia.Modularity/Dependency/LazyServiceProvider.Keyed.cs
@@ -0,0 +1,55 @@
+using Microsoft.Extensions.DependencyInjection;
+using Nerosoft.Euonia.Modularity;
+
+namespace System;
+
+public partial class LazyServiceProvider
+{
+ ///
+ public virtual T GetKeyedService(object serviceKey)
+ {
+ return (T)GetKeyedService(typeof(T), serviceKey);
+ }
+
+ ///
+ public virtual object GetKeyedService(Type serviceType, object serviceKey)
+ {
+ return CachedServices.GetOrAdd(new ServiceIdentifier(serviceKey, serviceType), _ => new Lazy