Пример #1
0
        public override async Task Handle(StatusCommandOptions options)
        {
            var commandContext = new StatusCommandContext
            {
                CommandOptions = options
            };

            var commandTransaction = new CommandTransactionManager <StatusCommandContext>(_log)
                                     .Stage(Resources.StatusCommandHandler_FindAppInstallations, FindAppInstallations)
                                     .Stage(Resources.StatusCommandHandler_GetStatusAppServices, GetStatusAppServices);

            await commandTransaction.Execute(commandContext);
        }
Пример #2
0
        public override async Task Handle(InitCommandOptions options)
        {
            CommonHelper.CheckAdministrativePrivileges();

            var commandContext = new InitCommandContext
            {
                CommandOptions = options
            };

            var commandTransaction = new CommandTransactionManager <InitCommandContext>(_log)
                                     .Stage(Resources.InitCommandHandler_FindAppInstallations, FindAppInstallations)
                                     .Stage(Resources.InitCommandHandler_StartAppInitialization, StartAppInitialization);

            await commandTransaction.Execute(commandContext);
        }
Пример #3
0
        public override async Task Handle(PackagesCommandOptions options)
        {
            CommonHelper.CheckAdministrativePrivileges();

            var context = new PackagesCommandContext
            {
                CommandOptions    = options,
                PackageRepository = _packageRepositoryFactory.Create()
            };

            var commandTransaction = new CommandTransactionManager <PackagesCommandContext>(_log)
                                     .Stage("List packages", FindPackages);

            await commandTransaction.Execute(context);
        }
        public override async Task Handle(UninstallCommandOptions options)
        {
            CommonHelper.CheckAdministrativePrivileges();

            var commandContext = new UninstallCommandContext
            {
                CommandOptions = options
            };

            var commandTransaction = new CommandTransactionManager <UninstallCommandContext>(_log)
                                     .Stage(Resources.UninstallCommandHandler_FindAppInstallations, FindAppInstallations)
                                     .Stage(Resources.UninstallCommandHandler_UninstallAppServices, UninstallAppServices)
                                     .Stage(Resources.UninstallCommandHandler_DeleteAppFiles, DeleteAppFiles)
            ;

            await commandTransaction.Execute(commandContext);
        }
        public override async Task Handle(InstallCommandOptions options)
        {
            CommonHelper.CheckAdministrativePrivileges();

            var commandContext = new InstallCommandContext
            {
                CommandOptions    = options,
                PackageRepository = _packageRepositoryFactory.Create(options.Source)
            };

            var commandTransaction = new CommandTransactionManager <InstallCommandContext>(_log)
                                     .Stage(Resources.InstallCommandHandler_InstallAppPackage, InstallAppPackage)
                                     .Stage(Resources.InstallCommandHandler_CheckAppInstallation, CheckAppInstallation)
                                     .Stage(Resources.InstallCommandHandler_FindSdkDependency, FindSdkDependency)
                                     .Stage(Resources.InstallCommandHandler_InstallPlatformPackage, InstallPlatformPackage)
                                     .Stage(Resources.InstallCommandHandler_InstallServiceHostPackage, InstallServiceHostPackage)
                                     .Stage(Resources.InstallCommandHandler_CopyAppFiles, CopyAppFiles)
                                     .Stage(Resources.InstallCommandHandler_InstallAppService, InstallAppService);

            await commandTransaction.Execute(commandContext);
        }