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