Skip to content

Commit 4aae317

Browse files
committed
Fix CS1503: use named parameter to disambiguate ArgumentException overload.
SDK 10.0.300 introduced overload ambiguity between ArgumentException(string, string) and ArgumentException(string, Exception?) when the message comes from a generated resource that returns string?. Using paramName: resolves the ambiguity.
1 parent 2be5fd7 commit 4aae317

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Autofac.Extras.AggregateService/AggregateServiceGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static object CreateInstance(Type interfaceType, IComponentContext contex
4747

4848
if (!interfaceType.GetTypeInfo().IsInterface)
4949
{
50-
throw new ArgumentException(AggregateServicesResources.TypeMustBeInterface, nameof(interfaceType));
50+
throw new ArgumentException(AggregateServicesResources.TypeMustBeInterface, paramName: nameof(interfaceType));
5151
}
5252

5353
var resolverInterceptor = new ResolvingInterceptor(interfaceType, context);

0 commit comments

Comments
 (0)