feat: enable early loaded services to wait for provided services, some rewrites to make service kind declaration more explicit

This commit is contained in:
goat 2023-10-01 21:12:27 +02:00
parent 0690f5dd2a
commit 2bdb837577
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
4 changed files with 37 additions and 26 deletions

View file

@ -123,6 +123,8 @@ internal static class Service<T> where T : IServiceType
public static List<Type> GetDependencyServices()
{
var res = new List<Type>();
ServiceManager.Log.Verbose("Service<{0}>: Getting dependencies", typeof(T).Name);
var ctor = GetServiceConstructor();
if (ctor != null)
@ -181,6 +183,11 @@ internal static class Service<T> where T : IServiceType
res.Add(serviceType);
}
}
foreach (var type in res)
{
ServiceManager.Log.Verbose("Service<{0}>: => Dependency: {1}", typeof(T).Name, type.Name);
}
return res
.Distinct()