|
24 | 24 |
|
25 | 25 | namespace Intent.Modules.AzureFunctions.Templates.Isolated.Program |
26 | 26 | { |
27 | | - [IntentManaged(Mode.Fully, Body = Mode.Merge)] |
| 27 | + [IntentManaged(Mode.Merge, Body = Mode.Merge)] |
28 | 28 | public partial class ProgramTemplate : CSharpTemplateBase<object>, ICSharpFileBuilderTemplate, IProgramTemplate, IProgramFile |
29 | 29 | { |
30 | 30 | public const string TemplateId = "Intent.AzureFunctions.Isolated.Program"; |
@@ -132,15 +132,15 @@ public ProgramTemplate(IOutputTarget outputTarget, object model = null) : base(T |
132 | 132 | } |
133 | 133 |
|
134 | 134 | var hostConfigStatement = new CSharpMethodChainStatement("new HostBuilder()") |
135 | | - .AddChainStatement( new CSharpInvocationStatement( "ConfigureFunctionsWebApplication").WithoutSemicolon() |
| 135 | + .AddChainStatement(new CSharpInvocationStatement("ConfigureFunctionsWebApplication").WithoutSemicolon() |
136 | 136 | //.OnNewLine() |
137 | 137 | .AddArgument(globalExceptionConfigStatement) |
138 | 138 | ) |
139 | 139 | .AddChainStatement(new CSharpInvocationStatement("ConfigureServices").WithoutSemicolon() |
140 | 140 | //.OnNewLine() |
141 | 141 | .AddArgument(configStatements) |
142 | 142 | ) |
143 | | - .AddChainStatement(new CSharpInvocationStatement("Build").OnNewLine()); |
| 143 | + .AddChainStatement(new CSharpInvocationStatement("Build").OnNewLine().WithoutSemicolon()); |
144 | 144 |
|
145 | 145 | tls.AddStatement(new CSharpAssignmentStatement("var host", hostConfigStatement)); |
146 | 146 | tls.AddStatement("host.Run();", s => s.SeparatedFromPrevious()); |
@@ -171,7 +171,7 @@ public ProgramTemplate(IOutputTarget outputTarget, object model = null) : base(T |
171 | 171 | // after the other handlers. |
172 | 172 | OnEmitOrPublished<ServiceConfigurationRequest>(ProcessServiceConfigurationRequest); |
173 | 173 | OnEmitOrPublished<ContainerRegistrationRequest>(ProcessContainerRegistrationRequest); |
174 | | - OnEmitOrPublished<ApplicationBuilderRegistrationRequest>(request => |
| 174 | + OnEmitOrPublished<ApplicationBuilderRegistrationRequest>(request => |
175 | 175 | ProcessApplicationBuilderRegistrationRequest(request, globalExceptionConfigStatement)); |
176 | 176 | }); |
177 | 177 |
|
@@ -327,7 +327,7 @@ private void ProcessApplicationBuilderRegistrationRequest(ApplicationBuilderRegi |
327 | 327 | { |
328 | 328 | return; |
329 | 329 | } |
330 | | - |
| 330 | + |
331 | 331 | // Until we can resolve this better here is a blacklist of common middleware: |
332 | 332 | if (request.ExtensionMethodName == "UseAuthentication") |
333 | 333 | { |
@@ -534,8 +534,8 @@ public IProgramFile ConfigureHostBuilderChainStatement(string methodName, IEnume |
534 | 534 | appConfigurationBlock.AddMetadata("priority", priority); |
535 | 535 |
|
536 | 536 |
|
537 | | - var insertAboveStatement = hostBuilderChain.Statements.FirstOrDefault(s => |
538 | | - { |
| 537 | + var insertAboveStatement = hostBuilderChain.Statements.FirstOrDefault(s => |
| 538 | + { |
539 | 539 | if (s.TryGetMetadata<int>("priority", out var statmentPriority)) |
540 | 540 | { |
541 | 541 | return statmentPriority > priority; |
|
0 commit comments