In XML file method call is configured on type registration. But the method is not called on resolving an instance. Here are samples of configuration and code.
Tested on 5.11.6
class Program
{
static void Main(string[] args)
{
var unity = new UnityContainer();
var t = unity.Resolve<TestClass>();
Console.ReadLine();
}
}
public class TestClass
{
public TestClass()
{
Console.WriteLine("constructor");
}
public void TestMethod()
{
Console.WriteLine("method");
}
}
In XML file method call is configured on type registration. But the method is not called on resolving an instance. Here are samples of configuration and code. Tested on 5.11.6