Description
Using 5.11.1
No matter what the method name is, enabling diagnostics will always throw an ambiguous name exception.
{"Method MyCompletelyUnambiguousInitializeMethod(True) is ambiguous, it could be matched with more than one method on type MyInitializableType.\r\n\r\n Error in: RegisterType<MyInitializableType>(Lifetime:Hierarchical, Invoke.Method('MyCompletelyUnambiguousInitializeMethod', True))\r\n"}
To Reproduce
[TestMethod]
public void SomeDescriptiveName()
{
var container = new UnityContainer();
container.EnableDebugDiagnostic();
container.RegisterType<MyInitializableType>(new HierarchicalLifetimeManager(),
new InjectionMethod(nameof(MyInitializableType.MyCompletelyUnambiguousInitializeMethod), true));
var res = container.Resolve<MyInitializableType>();
Assert.IsNotNull(res);
}
public class MyInitializableType
{
public void MyCompletelyUnambiguousInitializeMethod(bool arg)
{
Console.WriteLine($"Initialized: {arg}");
}
}
Description
Using 5.11.1
No matter what the method name is, enabling diagnostics will always throw an ambiguous name exception.
To Reproduce