implement client and server service implementations in Html/Text module

This commit is contained in:
sbwalker
2024-03-05 08:44:09 -05:00
parent 7d7ea4c34b
commit 74952cf62d
11 changed files with 214 additions and 30 deletions

View File

@ -220,6 +220,16 @@ namespace Oqtane.Client
services.AddScoped(serviceType ?? implementationType, implementationType);
}
}
implementationTypes = assembly.GetInterfaces<IClientService>();
foreach (var implementationType in implementationTypes)
{
if (implementationType.AssemblyQualifiedName != null)
{
var serviceType = Type.GetType(implementationType.AssemblyQualifiedName.Replace(implementationType.Name, $"I{implementationType.Name}"));
services.AddScoped(serviceType ?? implementationType, implementationType);
}
}
}
catch
{