quickwire
quickwire copied to clipboard
[Suggest] How about inherited
[RegisterService(ServiceLifetime.Scoped)]
[InjectAllInitOnlyProperties]
public abstract class BaseScope
{
public IScopeDataStore ScopeDataStore { get; init; }
}
public abstract class BaseScope2 : BaseScope
{
public IScopeDataStore2 ScopeDataStore2 { get; init; }
}
public class Implement1 : BaseScope
{
}
public class Implement2 : BaseScope2
{
}
[ServiceIgnore]
public class ImplementIgnore : BaseScope2
{
}
I want it scan and auto add scope all childs Implement1, .......ImplementN ....(except abstract class or ignore attribute)
We can add some flag to attribute like [RegisterService(ServiceLifetime.Scoped, Inherited : true)] or new attribute [RegisterChildService(ServiceLifetime.Scoped)]