hmemcpy / AgentMulder

** THIS PLUGIN IS NO LONGER MAINTAINED. PLEASE FOLLOW ERNICOMMUNITY FOR UPDATES **
https://github.com/ERNICommunity/AgentMulder
MIT License
151 stars 33 forks source link

Autofac Register() method makes all types appear as "Registered by autofac" #64

Closed ilya-g closed 9 years ago

ilya-g commented 10 years ago

Every type, even static ones, becomes registered by autofac, when you use this registration style:

    public static class TestRegister
    {
        public static void Main()
        {
            var builder = new ContainerBuilder();
            builder.Register(c => CreateInstance());
        }

        private static StringBuilder CreateInstance()
        {
            return new StringBuilder();
        }
    }
hmemcpy commented 10 years ago

Yikes! Thanks for letting me know, I'll try to fix it!

Porges commented 9 years ago

Think I have a fix for this but I only have VS "14" installed so I can't test it out in R#. I'll try it in VS2013 tomorrow.