Ejemplo n.º 1
0
        public void Execute(IArguments arguments)
        {
            if (arguments.Delete)
            {
                _log.Warn($"Deleting is running");
                _reportingServiceProxy.DeleteAllFolders();
            }

            if (arguments.Backup)
            {
                _reportManager.Backup(_settings.BackupPath);
                _subscriptionManager.Backup(_settings.BackupPath);
                return;
            }

            Run(arguments.ReportName, arguments.FolderName, arguments.Recreate);

            void Run(string reportName, string projectName, bool recreate)
            {
                if (arguments.Report)
                {
                    _reportManager.Deploy(
                        reportName,
                        projectName,
                        _settings.DatasetsServerFolderName,
                        _settings.DataSourcesServerFolderName,
                        recreate);
                }

                if (arguments.Subscription)
                {
                    _subscriptionManager.Deploy(reportName, recreate);
                }
            }
        }