-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
Consider the following
public class Foo
{
[Dependency]
public IService Service { get; set; }
}It would be nice if this were weaved to be the equivalent of:
public class Foo
{
private IService C<>_service;
[Dependency]
public IService Service
{
get => C<>_service ?? GlobalDI.GetService<IService>();
set => C<>_service = value;
}
}This would allow unit tests an opportunity to inject a test double without interfering with AutoDI functionality.