Exemplo n.º 1
0
        public int StartApplication(string appId, string[] parameters)
        {
            ExtensionNode node = AddinManager.GetExtensionNode("/MonoDevelop/Core/Applications/" + appId);

            if (node == null)
            {
                throw new InstallException("Application not found: " + appId);
            }

            ApplicationExtensionNode apnode = node as ApplicationExtensionNode;

            if (apnode == null)
            {
                throw new Exception("Invalid node type");
            }

            IApplication app = (IApplication)apnode.CreateInstance();

            try {
                return(app.Run(parameters));
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
                LoggingService.LogFatalError(ex.ToString());
                return(-1);
            }
        }
        public int StartApplication(string appId, string[] parameters)
        {
            ExtensionNode node = AddinManager.GetExtensionNode("/MonoDevelop/Core/Applications/" + appId);

            if (node == null)
            {
                throw new InstallException("Application not found: " + appId);
            }

            ApplicationExtensionNode apnode = node as ApplicationExtensionNode;

            if (apnode == null)
            {
                throw new Exception("Invalid node type");
            }

            IApplication app = (IApplication)apnode.CreateInstance();

            return(app.Run(parameters));
        }