GetService<IServiceType>() only tries to match interfaces and not specific implementations. #1

Closed
opened 2025-09-22 23:27:25 +00:00 by REDCODE · 0 comments
Owner

Quick example

ServiceContainer services = new();

services.AddSingleton<IMyService, MyService>();

var myService = services.GetService<MyService>(); //Will throw exception service not registered.
// expected to return the instance of MyService.
Quick example ```csharp ServiceContainer services = new(); services.AddSingleton<IMyService, MyService>(); var myService = services.GetService<MyService>(); //Will throw exception service not registered. // expected to return the instance of MyService. ```
REDCODE added the
bug
label 2025-09-22 23:28:06 +00:00
REDCODE started working 2025-09-24 01:46:48 +00:00
REDCODE worked for 4 minutes 2025-09-24 01:51:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Total Time Spent: 4 minutes
REDCODE
4 minutes
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: REDCODE/Syrette#1
No description provided.