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

No components matching this registration were found #13

Open constructor-igor opened 12 years ago

constructor-igor commented 12 years ago

when press "Registered Components" (on first Random) next message shown "No components matching this registration were found"

if "Registered Components" should shows all components or for the line only?

static void UnityDemoConstructorWithArray()
        {
            IUnityContainer container = new UnityContainer();
            container.RegisterType<Random, Random>(
                new InjectionConstructor());                 // use default constructor for new Random()
            container.RegisterType<Random, MyRandom>(
                new InjectionConstructor());                 // use default constructor for new Random()
            container.RegisterType<MyServiceWithArray>
                (new InjectionConstructor(
                    new ResolvedParameter<Random[]>()));

            MyServiceWithArray myService = container.Resolve<MyServiceWithArray>();
            foreach (Random random in myService.Randoms)
            {
                Console.WriteLine("Next: " + random.Next());
            }
        }