Skip to content

Commit 5d9eadc

Browse files
committed
Fixing an issue with DryIcO service type validation
1 parent 5d36a55 commit 5d9eadc

File tree

1 file changed

+1
-0
lines changed
  • src/WebJobs.Script.WebHost/DependencyInjection/DryIoc

1 file changed

+1
-0
lines changed

src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7132,6 +7132,7 @@ internal override bool ThrowIfInvalidRegistration(Type serviceType, object servi
71327132
implType, implType.GetGenericDefinitionOrNull());
71337133

71347134
else if (implType != serviceType && serviceType != typeof(object)
7135+
&& !implType.IsAssignableTo(serviceType)
71357136
&& implType.GetImplementedTypes().IndexOf(t =>
71367137
t == serviceType || t.GetGenericDefinitionOrNull() == serviceType) == -1)
71377138
Throw.It(Error.RegisteringImplementationNotAssignableToServiceType, implType, serviceType);

0 commit comments

Comments
 (0)