public static ObjectProvider CreateObjectProvider(params IAssembler[] assemblers)
 {
     Linker linker = new Linker ();
     foreach (IAssembler assembler in assemblers)
         assembler.AssembleComponents (linker);
     return new ObjectProvider (linker);
 }
 public static ObjectProvider CreateObjectProvider()
 {
     Linker linker = new Linker ();
     return new ObjectProvider (linker);
 }
        public void AssembleComponents(Linker linker)
        {
            linker.WireInterface (typeof (IFirstComponent), delegate () {
                return new FirstComponentImpl ();
            });

            linker.WireInterface (typeof (ISecondComponent), delegate () {
                return new SecondComponentFieldInjectionImpl ();
            });

            linker.WireInterface (typeof (IThirdComponent), typeof (ThirdComponentFieldInjectionImpl));
        }
 public void AssembleComponents(Linker linker)
 {
     linker.WireInterface (typeof (Notifications), delegate () {
         return Bus.Session.GetObject<Notifications> ("org.freedesktop.Notifications", new ObjectPath ("/org/freedesktop/Notifications"));
     });
 }
        public void AssembleComponents(Linker linker)
        {
            linker.WireInterface (typeof (IFirstVariousImplementationComponent) ,typeof (OneAttribute), delegate () {
                return new FirstVariousImplementationComponentOneImpl ();
            });

            linker.WireInterface (typeof (IFirstVariousImplementationComponent), typeof (TwoAttribute), delegate () {
                return new FirstVariousImplementationComponentTwoImpl ();
            });

            linker.WireInterface (typeof (ISecondVariousImplementationComponent), typeof (OneAttribute), delegate () {
                return new SecondVariousImplementationComponentOneImpl (new FirstVariousImplementationComponentTwoImpl ());
            });

            linker.WireInterface (typeof (ISecondVariousImplementationComponent), typeof (TwoAttribute), delegate () {
                return new SecondVariousImplementationComponentTwoImpl (new FirstVariousImplementationComponentOneImpl ());
            });
        }