Skip to content

Commit

Permalink
(#674) changed TypeResolver in Cli/logging
Browse files Browse the repository at this point in the history
to adhere to the specifications set in #620
  • Loading branch information
nils-a authored and patriksvensson committed Jan 2, 2022
1 parent 52c1d91 commit 9a6d8d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/Cli/Logging/Infrastructure/TypeResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ public TypeResolver(IServiceProvider provider)

public object Resolve(Type type)
{
return _provider.GetRequiredService(type);
if (type == null)
{
return null;
}

return _provider.GetService(type);
}
}

0 comments on commit 9a6d8d9

Please sign in to comment.