コード例 #1
0
 public void ProceedInject(string path, string nodeName, string name, KevoreeCoreBean core)
 {
     Init();
     _injector.inject <Context>(_node, new InstanceContext(path, nodeName, name));
     _injector.inject <ModelService>(_node, new ContextAwareAdapter(core, path));
     _injector.inject(_node, core.getLogger().getInstance(name));
     _injector.inject(_node, core.getBootstrapService());
 }
コード例 #2
0
 public void ProceedInject(string path, string nodeName, string name, KevoreeCoreBean core)
 {
     Init();
     _injector.inject<Context>(_node, new InstanceContext(path, nodeName, name));
     _injector.inject<ModelService>(_node, new ContextAwareAdapter(core, path));
     _injector.inject(_node, core.getLogger().getInstance(name));
     _injector.inject(_node, core.getBootstrapService());
 }
コード例 #3
0
        private static void Main(string[] args)
        {
            var options = new CommandLineOptions();

            if (Parser.Default.ParseArguments(args, options))
            {
                try
                {
                    var boot = new Bootstrap(options.NodeName, options.KevoreeRegistryUrl,
                                             options.NugetLocalRepositoryPath, options.NugetRepositoryUrl, Level.Debug);
                    if (options.ScriptPath == null)
                    {
                        /*
                         * A default model is loaded.
                         * It is composed of a WSGroup and a Dotnet Node, attached together.
                         * The Dot	net Node name is "nodeName".
                         * The WSGroup listen on port 9000.
                         */
                        var defaultKevScript = string.Format(@"add {0} : dotnet.dotnetNode/1/LATEST 
							add sync : WSGroup/1/LATEST 
attach {0} sync", options.NodeName);
                        boot.LoadKevScript(defaultKevScript, x => Core.getLogger().Warn("Bootstrap completed"));
                    }
                    else
                    {
                        /*
                         * We try to load scriptPath file and guess it's content by extention (.json for a json model or .kev for a kev script model).
                         */
                        boot.LoadScript(options.ScriptPath);
                    }
                }
                catch (java.lang.Exception e)
                {
                    Core.getLogger().Error(e.ToString());
                }
            }
        }