Skip to content

Commit 539ba41

Browse files
committed
Keep the semicolon on the same line as requested by PR review
1 parent e225cc2 commit 539ba41

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/Program.Main.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,27 @@ public static void Main(string[] args)
2424
};
2525

2626
var todosApi = app.MapGroup("/todos");
27+
#if (EnableOpenAPI)
2728
todosApi.MapGet("/", () => sampleTodos)
28-
#if (EnableOpenAPI)
2929
.WithName("GetTodos");
30-
#else
31-
;
32-
#endif
30+
#else
31+
todosApi.MapGet("/", () => sampleTodos);
32+
#endif
3333

34+
#if (EnableOpenAPI)
3435
todosApi.MapGet("/{id}", (int id) =>
3536
sampleTodos.FirstOrDefault(a => a.Id == id) is { } todo
3637
? Results.Ok(todo)
3738
: Results.NotFound())
38-
#if (EnableOpenAPI)
3939
.WithName("GetTodoById")
4040
.Produces<Todo>(StatusCodes.Status200OK)
4141
.Produces(StatusCodes.Status404NotFound);
42-
#else
43-
;
44-
#endif
42+
#else
43+
todosApi.MapGet("/{id}", (int id) =>
44+
sampleTodos.FirstOrDefault(a => a.Id == id) is { } todo
45+
? Results.Ok(todo)
46+
: Results.NotFound());
47+
#endif
4548

4649
app.Run();
4750
}

src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/Program.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,27 @@
3030
};
3131

3232
var todosApi = app.MapGroup("/todos");
33+
#if (EnableOpenAPI)
3334
todosApi.MapGet("/", () => sampleTodos)
34-
#if (EnableOpenAPI)
3535
.WithName("GetTodos");
36-
#else
37-
;
38-
#endif
36+
#else
37+
todosApi.MapGet("/", () => sampleTodos);
38+
#endif
3939

40+
#if (EnableOpenAPI)
4041
todosApi.MapGet("/{id}", (int id) =>
4142
sampleTodos.FirstOrDefault(a => a.Id == id) is { } todo
4243
? Results.Ok(todo)
4344
: Results.NotFound())
44-
#if (EnableOpenAPI)
4545
.WithName("GetTodoById")
4646
.Produces<Todo>(StatusCodes.Status200OK)
4747
.Produces(StatusCodes.Status404NotFound);
48-
#else
49-
;
50-
#endif
48+
#else
49+
todosApi.MapGet("/{id}", (int id) =>
50+
sampleTodos.FirstOrDefault(a => a.Id == id) is { } todo
51+
? Results.Ok(todo)
52+
: Results.NotFound());
53+
#endif
5154

5255
app.Run();
5356

0 commit comments

Comments
 (0)