-
Notifications
You must be signed in to change notification settings - Fork 39
/
ServiceCollectionExtensionsManager_cs.hbs
37 lines (33 loc) · 1.32 KB
/
ServiceCollectionExtensionsManager_cs.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* This file is automatically generated; any changes will be lost.
*/
{{#if Root.PreprocessorDirectives}}
#nullable enable
#pragma warning disable
{{/if}}
namespace Microsoft.Extensions.DependencyInjection;
/// <summary>
/// Provides the generated <b>Manager</b>-layer services.
/// </summary>
public static partial class {{#if IsRefData}}ReferenceData{{/if}}ServiceCollectionsExtension
{
/// <summary>
/// Adds the generated <b>Manager</b>-layer services.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/>.</param>
/// <returns>The <see cref="IServiceCollection"/>.</returns>
public static IServiceCollection AddGenerated{{#if IsRefData}}ReferenceData{{/if}}ManagerServices(this IServiceCollection services)
{{#if IsRefData}}
=> services.AddScoped<IReferenceDataProvider, ReferenceDataProvider>(){{#ifeq IManagerEntities.Count 0}};{{/ifeq}}
{{else}}
{
{{/if}}
{{#each IManagerEntities}}
{{#if @first}}{{#if Root.IsRefData}} {{else}}return services{{/if}}{{else}} {{/if}}.AddScoped<I{{Name}}Manager{{#if GenericWithT}}<T>{{/if}}, {{Name}}Manager{{#if GenericWithT}}<T>{{/if}}>(){{#if @last}};{{/if}}
{{/each}}
{{#unless IsRefData}}
}
{{/unless}}
}{{#if Root.PreprocessorDirectives}}
#pragma warning restore
#nullable restore{{/if}}