mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-24 04:02:50 +08:00
(#674) changed TypeResolver in Cli/logging
to adhere to the specifications set in #620
This commit is contained in:
parent
52c1d9122b
commit
9a6d8d92b4
@ -15,6 +15,11 @@ public sealed class TypeResolver : ITypeResolver
|
|||||||
|
|
||||||
public object Resolve(Type type)
|
public object Resolve(Type type)
|
||||||
{
|
{
|
||||||
return _provider.GetRequiredService(type);
|
if (type == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _provider.GetService(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user