Skip to content

Commit 6a69e17

Browse files
committed
Typo in exception message fixed.
1 parent 1e463f6 commit 6a69e17

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/SimpleInjector.Integration.AspNetCore/Requires.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ private static void ThrowSuppliedTypeDoesNotInheritFromOrImplement(
4444
var implementOrInherit = service.GetTypeInfo().IsInterface ? "implement" : "inherit from";
4545

4646
throw new ArgumentException(
47-
$"The supplied type {implementation.FullName} does not {implementOrInherit} " +
48-
$"from {service.FullName}.",
47+
$"The supplied type {implementation.FullName} does not {implementOrInherit} {service.FullName}.",
4948
paramName);
5049
}
5150
}

src/SimpleInjector.Integration.AspNetCore/SimpleInjectorAspNetIntegrationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static IApplicationBuilder UseMiddleware<TMiddleware>(
8989
// error. This would result in a really confusing error message. By removing the constraint, C# will still
9090
// prefer calling this method, in which case we can throw an expressive exception explaining that
9191
// TMiddleware should implement IMiddleware. See #5
92-
return UseMiddlewareInternal(app, typeof(TMiddleware), container, nameof(TMiddleware));
92+
return UseMiddlewareInternal(app, typeof(TMiddleware), container, "TMiddleware");
9393
}
9494

9595
/// <summary>

0 commit comments

Comments
 (0)