-
Notifications
You must be signed in to change notification settings - Fork 377
/
Copy pathComponents.cs
67 lines (61 loc) · 3.45 KB
/
Components.cs
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.TemplateEngine.Abstractions;
using Microsoft.TemplateEngine.Orchestrator.RunnableProjects.Abstractions;
using Microsoft.TemplateEngine.Orchestrator.RunnableProjects.Macros;
using Microsoft.TemplateEngine.Orchestrator.RunnableProjects.OperationConfig;
using Microsoft.TemplateEngine.Orchestrator.RunnableProjects.Validation;
namespace Microsoft.TemplateEngine.Orchestrator.RunnableProjects
{
public static class Components
{
private static readonly CaseChangeMacro CaseChange = new();
private static readonly GeneratePortNumberMacro GeneratePortNumberMacro = new();
private static readonly CoalesceMacro CoalesceMacro = new();
private static readonly ConstantMacro ConstantMacro = new();
private static readonly GuidMacro GuidMacro = new();
private static readonly SwitchMacro SwitchMacro = new();
private static readonly RegexMatchMacro RegexMatchMacro = new();
private static readonly RegexMacro RegexMacro = new();
private static readonly RandomMacro RandomMacro = new();
private static readonly NowMacro NowMacro = new();
private static readonly JoinMacro JoinMacro = new();
public static IReadOnlyList<(Type Type, IIdentifiedComponent Instance)> AllComponents { get; } =
new (Type Type, IIdentifiedComponent Instance)[]
{
(typeof(IGenerator), new RunnableProjectGenerator()),
(typeof(IOperationConfig), new BalancedNestingConfig()),
(typeof(IOperationConfig), new ConditionalConfig()),
(typeof(IOperationConfig), new FlagsConfig()),
(typeof(IOperationConfig), new IncludeConfig()),
(typeof(IOperationConfig), new RegionConfig()),
(typeof(IOperationConfig), new ReplacementConfig()),
(typeof(IMacro), CaseChange),
(typeof(IGeneratedSymbolMacro), CaseChange),
(typeof(IMacro), CoalesceMacro),
(typeof(IGeneratedSymbolMacro), CoalesceMacro),
(typeof(IMacro), ConstantMacro),
(typeof(IGeneratedSymbolMacro), ConstantMacro),
(typeof(IMacro), new EvaluateMacro()),
(typeof(IMacro), GeneratePortNumberMacro),
(typeof(IGeneratedSymbolMacro), GeneratePortNumberMacro),
(typeof(IMacro), GuidMacro),
(typeof(IGeneratedSymbolMacro), GuidMacro),
(typeof(IMacro), JoinMacro),
(typeof(IGeneratedSymbolMacro), JoinMacro),
(typeof(IMacro), NowMacro),
(typeof(IGeneratedSymbolMacro), NowMacro),
(typeof(IMacro), new ProcessValueFormMacro()),
(typeof(IMacro), RandomMacro),
(typeof(IGeneratedSymbolMacro), RandomMacro),
(typeof(IMacro), RegexMacro),
(typeof(IGeneratedSymbolMacro), RegexMacro),
(typeof(IMacro), RegexMatchMacro),
(typeof(IGeneratedSymbolMacro), RegexMatchMacro),
(typeof(IMacro), SwitchMacro),
(typeof(IGeneratedSymbolMacro), SwitchMacro),
(typeof(ITemplateValidatorFactory), new MandatoryValidationFactory()),
(typeof(ITemplateValidatorFactory), new MandatoryLocalizationValidationFactory()),
};
}
}