Skip to content

Commit

Permalink
Update ServiceRegistrationWriter.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Nov 16, 2023
1 parent 7941f95 commit 5889000
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Injectio.Generators/ServiceRegistrationWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@ private static void WriteServiceType(
.IncrementIndent()
.AppendLine("serviceCollection,")
.Append("global::Microsoft.Extensions.DependencyInjection.ServiceDescriptor.")
.Append(serviceRegistration.ServiceKey != null ? "DescribeKeyed" : "Describe")
.Append(serviceRegistration.ServiceKey.HasValue() ? "DescribeKeyed" : "Describe")
.AppendLine("(")
.IncrementIndent()
.Append("typeof(")
.AppendIf("global::", !serviceType.StartsWith("global::"))
.Append(serviceType)
.AppendLine("),");

if (serviceRegistration.ServiceKey != null)
if (serviceRegistration.ServiceKey.HasValue())
{
codeBuilder
.Append(serviceRegistration.ServiceKey)
Expand Down

0 comments on commit 5889000

Please sign in to comment.