3 implementations of ICustomService
BasicWebSite (3)
CustomService.cs (3)
15public class OkCustomService : ICustomService 21public class BadCustomService : ICustomService 27public class DefaultCustomService : ICustomService
10 references to ICustomService
BasicWebSite (10)
Controllers\CustomServiceApiController.cs (7)
13public ActionResult<string> GetOk([FromKeyedServices("ok_service")] ICustomService service) 19public ActionResult<string> GetNotOk([FromKeyedServices("not_ok_service")] ICustomService service) 26[FromKeyedServices("ok_service")] ICustomService s1, 27[FromKeyedServices("not_ok_service")] ICustomService s2) 33public ActionResult<string> GetKeyNull([FromKeyedServices(null)] ICustomService service) 41public ActionResult<string> GetOptionalNotRegistered([FromKeyedServices("no_existing_key")] ICustomService? service) 51public ActionResult<string> GetRequiredNotRegistered([FromKeyedServices("no_existing_key")] ICustomService service)
StartupWithoutEndpointRouting.cs (3)
46services.AddKeyedSingleton<ICustomService, OkCustomService>("ok_service"); 47services.AddKeyedSingleton<ICustomService, BadCustomService>("not_ok_service"); 48services.AddSingleton<ICustomService, DefaultCustomService>();