eabf270d71
Resolve all 622 issues flagged by the enhanced CommentChecker: add missing <returns> tags (incl. the standard phrasing on non-generic Task methods), add missing <summary> tags, and replace misused/redundant <inheritdoc/> on members that override or implement nothing with real documentation. Documentation-only — no behavior change; solution builds clean.
54 lines
2.2 KiB
C#
54 lines
2.2 KiB
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using ZB.MOM.WW.ScadaBridge.TemplateEngine.Flattening;
|
|
using ZB.MOM.WW.ScadaBridge.TemplateEngine.Services;
|
|
using ZB.MOM.WW.ScadaBridge.TemplateEngine.Validation;
|
|
|
|
namespace ZB.MOM.WW.ScadaBridge.TemplateEngine;
|
|
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
/// <summary>
|
|
/// Registers all template engine services (template, flattening, validation, and domain services).
|
|
/// </summary>
|
|
/// <param name="services">The service collection to register into.</param>
|
|
/// <returns>The same <paramref name="services"/> instance for chaining.</returns>
|
|
public static IServiceCollection AddTemplateEngine(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<TemplateService>();
|
|
services.AddScoped<SharedScriptService>();
|
|
|
|
// Flattening services (stateless utilities)
|
|
services.AddTransient<FlatteningService>();
|
|
services.AddTransient<DiffService>();
|
|
services.AddTransient<RevisionHashService>();
|
|
|
|
// Validation services (stateless utilities)
|
|
services.AddTransient<ScriptCompiler>();
|
|
services.AddTransient<SemanticValidator>();
|
|
services.AddTransient<ValidationService>();
|
|
|
|
// Domain services (depend on scoped DbContext / repositories)
|
|
services.AddScoped<InstanceService>();
|
|
services.AddScoped<SiteService>();
|
|
services.AddScoped<AreaService>();
|
|
services.AddScoped<TemplateFolderService>();
|
|
services.AddScoped<TemplateDeletionService>();
|
|
|
|
// Note: CycleDetector, CollisionDetector, LockEnforcer, and TemplateResolver
|
|
// are static utility classes and do not require DI registration.
|
|
|
|
return services;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Registers Akka.NET actors for the template engine (placeholder for future actor registration).
|
|
/// </summary>
|
|
/// <param name="services">The service collection to register into.</param>
|
|
/// <returns>The same <paramref name="services"/> instance for chaining.</returns>
|
|
public static IServiceCollection AddTemplateEngineActors(this IServiceCollection services)
|
|
{
|
|
// Phase 0: placeholder for Akka actor registration
|
|
return services;
|
|
}
|
|
}
|