Пример #1
0
    public RunOrchestrator(
        IAppBundleInformationParser appBundleInformationParser,
        IAppInstaller appInstaller,
        IAppUninstaller appUninstaller,
        IAppRunnerFactory appRunnerFactory,
        IDeviceFinder deviceFinder,
        IiOSExitCodeDetector iOSExitCodeDetector,
        IMacCatalystExitCodeDetector macCatalystExitCodeDetector,
        ILogger consoleLogger,
        ILogs logs,
        IFileBackedLog mainLog,
        IErrorKnowledgeBase errorKnowledgeBase,
        IDiagnosticsData diagnosticsData,
        IHelpers helpers)
        : base(appBundleInformationParser, appInstaller, appUninstaller, deviceFinder, consoleLogger, logs, mainLog, errorKnowledgeBase, diagnosticsData, helpers)
    {
        _iOSExitCodeDetector         = iOSExitCodeDetector ?? throw new ArgumentNullException(nameof(iOSExitCodeDetector));
        _macCatalystExitCodeDetector = macCatalystExitCodeDetector ?? throw new ArgumentNullException(nameof(macCatalystExitCodeDetector));
        _logger             = consoleLogger ?? throw new ArgumentNullException(nameof(consoleLogger));
        _logs               = logs ?? throw new ArgumentNullException(nameof(logs));
        _errorKnowledgeBase = errorKnowledgeBase ?? throw new ArgumentNullException(nameof(errorKnowledgeBase));

        // Only add the extra callback if we do know that the feature was indeed enabled
        Action <string>?logCallback = IsLldbEnabled() ? (l) => NotifyUserLldbCommand(_logger, l) : null;

        _appRunner = appRunnerFactory.Create(mainLog, logs, logCallback);
    }
Пример #2
0
 public static IAppInstaller GetInstance(IPingService pingService, DataBuilderHelper dataBuilderHelper, ILogger logger, IDBService dbProxy, IEncryption encryptionService, IModuleInstaller moduleInstaller, IRoutings routing)
 {
     if (_appInstaller == null)
     {
         lock (lockObject)
         {
             _appInstaller = new Installer(pingService, dataBuilderHelper, logger, dbProxy, encryptionService, moduleInstaller, routing);
         }
     }
     return(_appInstaller);
 }
Пример #3
0
 public InstallOrchestrator(
     IAppInstaller appInstaller,
     IAppUninstaller appUninstaller,
     IAppBundleInformationParser appBundleInformationParser,
     IDeviceFinder deviceFinder,
     ILogger consoleLogger,
     ILogs logs,
     IFileBackedLog mainLog,
     IErrorKnowledgeBase errorKnowledgeBase,
     IDiagnosticsData diagnosticsData,
     IHelpers helpers)
     : base(appBundleInformationParser, appInstaller, appUninstaller, deviceFinder, consoleLogger, logs, mainLog, errorKnowledgeBase, diagnosticsData, helpers)
 {
 }
Пример #4
0
 public MachineConfigurator(ISystemInitializer systemInitializer,
                            IManifestRepository manifestRepository,
                            IAppInstaller appInstaller,
                            IDownloadAppInstaller downloadAppInstaller,
                            IAppConfigurator appConfigurator,
                            IConsoleLogger consoleLogger)
 {
     this.systemInitializer    = systemInitializer;
     this.manifestRepository   = manifestRepository;
     this.appInstaller         = appInstaller;
     this.downloadAppInstaller = downloadAppInstaller;
     this.appConfigurator      = appConfigurator;
     this.consoleLogger        = consoleLogger;
 }
Пример #5
0
        private void CreateInstallInstance()
        {
            var dbProxy            = new MongoDBService();
            var appInstallerLogger = Logger.GetLogger(typeof(ModuleInstaller.Installer.ModuleInstaller).Name, _httpProxy.TransactionId, dbProxy);
            var pingService        = new PingService(new MongoDBService());
            var routings           = ZNxtApp.Core.Web.Routings.Routings.GetRoutings();

            _appInstaller = ZNxtApp.Core.AppInstaller.Installer.GetInstance(
                pingService,
                new Helpers.DataBuilderHelper(),
                appInstallerLogger,
                dbProxy,
                new EncryptionService(),
                new ModuleInstaller.Installer.ModuleInstaller(appInstallerLogger, dbProxy),
                routings);
        }
Пример #6
0
 public JustRunOrchestrator(
     IAppBundleInformationParser appBundleInformationParser,
     IAppInstaller appInstaller,
     IAppUninstaller appUninstaller,
     IAppRunnerFactory appRunnerFactory,
     IDeviceFinder deviceFinder,
     IiOSExitCodeDetector iOSExitCodeDetector,
     IMacCatalystExitCodeDetector macCatalystExitCodeDetector,
     ILogger consoleLogger,
     ILogs logs,
     IFileBackedLog mainLog,
     IErrorKnowledgeBase errorKnowledgeBase,
     IDiagnosticsData diagnosticsData,
     IHelpers helpers)
     : base(appBundleInformationParser, appInstaller, appUninstaller, appRunnerFactory, deviceFinder, iOSExitCodeDetector, macCatalystExitCodeDetector, consoleLogger, logs, mainLog, errorKnowledgeBase, diagnosticsData, helpers)
 {
 }
Пример #7
0
 public TestOrchestrator(
     IAppBundleInformationParser appBundleInformationParser,
     IAppInstaller appInstaller,
     IAppUninstaller appUninstaller,
     IAppTesterFactory appTesterFactory,
     IDeviceFinder deviceFinder,
     ILogger consoleLogger,
     ILogs logs,
     IFileBackedLog mainLog,
     IErrorKnowledgeBase errorKnowledgeBase,
     IDiagnosticsData diagnosticsData,
     IHelpers helpers)
     : base(appBundleInformationParser, appInstaller, appUninstaller, deviceFinder, consoleLogger, logs, mainLog, errorKnowledgeBase, diagnosticsData, helpers)
 {
     _appTesterFactory   = appTesterFactory ?? throw new ArgumentNullException(nameof(appTesterFactory));
     _logger             = consoleLogger ?? throw new ArgumentNullException(nameof(consoleLogger));
     _logs               = logs ?? throw new ArgumentNullException(nameof(logs));
     _mainLog            = mainLog ?? throw new ArgumentNullException(nameof(mainLog));
     _errorKnowledgeBase = errorKnowledgeBase ?? throw new ArgumentNullException(nameof(errorKnowledgeBase));
 }
Пример #8
0
 protected BaseOrchestrator(
     IAppBundleInformationParser appBundleInformationParser,
     IAppInstaller appInstaller,
     IAppUninstaller appUninstaller,
     IDeviceFinder deviceFinder,
     ILogger consoleLogger,
     ILogs logs,
     IFileBackedLog mainLog,
     IErrorKnowledgeBase errorKnowledgeBase,
     IDiagnosticsData diagnosticsData,
     IHelpers helpers)
 {
     _appBundleInformationParser = appBundleInformationParser ?? throw new ArgumentNullException(nameof(appBundleInformationParser));
     _appInstaller       = appInstaller ?? throw new ArgumentNullException(nameof(appInstaller));
     _appUninstaller     = appUninstaller ?? throw new ArgumentNullException(nameof(appUninstaller));
     _deviceFinder       = deviceFinder ?? throw new ArgumentNullException(nameof(deviceFinder));
     _logger             = consoleLogger ?? throw new ArgumentNullException(nameof(consoleLogger));
     _logs               = logs ?? throw new ArgumentNullException(nameof(logs));
     _mainLog            = mainLog ?? throw new ArgumentNullException(nameof(mainLog));
     _errorKnowledgeBase = errorKnowledgeBase ?? throw new ArgumentNullException(nameof(errorKnowledgeBase));
     _diagnosticsData    = diagnosticsData ?? throw new ArgumentNullException(nameof(diagnosticsData));
     _helpers            = helpers ?? throw new ArgumentNullException(nameof(helpers));
 }
Пример #9
0
 public ScoopCliInstaller(IAppInstaller appInstaller)
 {
     this.appInstaller = appInstaller;
 }
Пример #10
0
        public virtual void Create()
        {
            int          appInfoId = cvt.ToInt(ctx.Post("appInfoId"));
            AppInstaller info      = getAppInfo(appInfoId);

            if (info.IsClose(ctx.owner.obj.GetType()))
            {
                echo("app closed");
                return;
            }

            if (!checkInstall(info))
            {
                return;
            }

            String       name = ctx.Post("Name");
            AccessStatus accs = AccessStatus.Public;

            if (strUtil.IsNullOrEmpty(name))
            {
                echoError("请填写名称");
                return;
            }

            // 自定义安装
            Type appType = ObjectContext.Instance.TypeList[info.TypeFullName];

            if (rft.IsInterface(appType, typeof(IAppInstaller)))
            {
                // 主题ID
                String themeId = ctx.Post("themeId");

                IAppInstaller customInstaller = ObjectContext.Create(appType) as IAppInstaller;
                IMemberApp    capp            = customInstaller.Install(ctx, ctx.owner.obj, name, accs, themeId, "");
                intiAppPermission(capp);


                echoToParentPart(lang("opok"), to(Index), 1);
                return;
            }

            // 主题安装
            if (strUtil.HasText(info.InstallerType))
            {
                // 主题ID
                String themeId = ctx.Post("themeId");

                Type installerType = ObjectContext.GetType(info.InstallerType);

                IAppInstaller customInstaller = ObjectContext.Create(installerType) as IAppInstaller;
                IMemberApp    capp            = customInstaller.Install(ctx, ctx.owner.obj, name, accs, themeId, "");
                intiAppPermission(capp);

                echoToParentPart(lang("opok"), to(Index), 1);
                return;
            }

            // 默认安装
            IMember owner   = ctx.owner.obj;
            User    creator = (User)ctx.viewer.obj;

            // 1、添加一条 IMemberApp
            IMemberApp app = userAppService.Add(creator, owner, name, info.Id, accs);

            if (app != null)
            {
                // 2、添加菜单
                String appUrl = UrlConverter.clearUrl(app, ctx);
                menuService.AddMenuByApp(app, name, "", appUrl);

                // 3、初始化权限
                intiAppPermission(app);

                log(SiteLogString.InsertApp(), app);


                echoToParentPart(lang("opok"), to(Index), 1);
            }
            else
            {
                errors.Add(lang("exop"));

                run(NewApp, info.Id);
            }
        }
Пример #11
0
 public HomePageController(IAppInstaller appInstaller, IGridBuilderService gridBuilderService, IPicuturesRespository picuturesRespository)
 {
     _appInstaller         = appInstaller;
     _gridBuilderService   = gridBuilderService;
     _picuturesRespository = picuturesRespository;
 }
 public void Uninstall(AppPool appPool, IAppInstaller uninstaller)
 {
     
 }
 public void Install(AppPool appPool, IAppInstaller installer)
 {
     
 }
Пример #14
0
 public HomePageController(IAppInstaller appInstaller, IGridBuilderService gridBuilderService, IPicuturesRespository picuturesRespository)
 {
     _appInstaller = appInstaller;
     _gridBuilderService = gridBuilderService;
     _picuturesRespository = picuturesRespository;
 }