From 587495dc10d7c82a05b748d8a49ba7b864dde773 Mon Sep 17 00:00:00 2001
From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
Date: Mon, 2 Oct 2023 13:40:48 -1000
Subject: [PATCH] clean up
---
fundamentals/aot/diagnostics/Rdg13/Program.cs | 33 ++-----------------
1 file changed, 2 insertions(+), 31 deletions(-)
diff --git a/fundamentals/aot/diagnostics/Rdg13/Program.cs b/fundamentals/aot/diagnostics/Rdg13/Program.cs
index 3c17145..0a2f719 100644
--- a/fundamentals/aot/diagnostics/Rdg13/Program.cs
+++ b/fundamentals/aot/diagnostics/Rdg13/Program.cs
@@ -1,4 +1,4 @@
-#define RDG13F // RDG13 RDG13F
+#define RDG13 // RDG13 RDG13F
#if NEVER
#elif RDG13
//
@@ -7,8 +7,6 @@ using Microsoft.AspNetCore.Mvc;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddKeyedSingleton("fizz");
-builder.Services.AddKeyedSingleton("buzz");
-builder.Services.AddSingleton();
var app = builder.Build();
app.MapGet("/fizz", ([FromKeyedServices("fizz")][FromServices] IService service) =>
@@ -16,18 +14,8 @@ app.MapGet("/fizz", ([FromKeyedServices("fizz")][FromServices] IService service)
return Results.Ok(service.Echo());
});
-app.MapGet("/buzz", ([FromKeyedServices("buzz")] IService service) =>
-{
- return Results.Ok(service.Echo());
-});
-
-app.MapGet("/fizzbuzz", ([FromServices] IService service) =>
-{
- return Results.Ok(service.Echo());
-});
-
app.Run();
-
+//
public interface IService
{
string Echo();
@@ -40,23 +28,6 @@ public class FizzService : IService
return "Fizz";
}
}
-
-public class BuzzService : IService
-{
- public string Echo()
- {
- return "Buzz";
- }
-}
-
-public class FizzBuzzService : IService
-{
- public string Echo()
- {
- return "FizzBuzz";
- }
-}
-//
#elif RDG13F
//
using Microsoft.AspNetCore.Mvc;