示例#1
0
        public void launch()
        {
            //Create the injector that will be used in the application
            var guiceJs = new GuiceJs();
            var injector = guiceJs.createInjector(new RandoriModule());

            var domWalker = (DomWalker)injector.getInstance(typeof(DomWalker));
            domWalker.walkDomFragment(rootNode, (InjectionClassBuilder)injector.getInstance(typeof(InjectionClassBuilder)));
        }
示例#2
0
        public InjectionClassBuilder buildChildClassBuilder(InjectionClassBuilder classBuilder, HtmlElement element, JsString contextClassName)
        {
            var module = (GuiceModule)classBuilder.buildClass(contextClassName);
            var injector = (ChildInjector)classBuilder.buildClass("guice.ChildInjector");
            var guiceJs = new GuiceJs();
            guiceJs.configureInjector(injector, module);

            //Setup a new InjectionClassBuilder
            return (InjectionClassBuilder)injector.getInstance(typeof(InjectionClassBuilder));
        }