Esempio n. 1
0
      public Example2()
      {
         /*
          * Registration using attributes.
          * Demonstrates a type with an interface and a type without an interface
          
          */


         IIocContainer container = new IocContainer();
         container.RegisterTypesOf<RegisteredDependencyAttribute>();

         IMyExample2 temp = container.Resolve<IMyExample2>();

         Console.WriteLine("Example 2 : {0}" ,temp.Text);

         MyExample2a temp2 = container.Resolve<MyExample2a>();

         Console.WriteLine("Example 2a : {0}", temp2.Text);
      }