示例#1
0
        public void SaveReportFile(ReportBundle reportBundle, [NotNull] ReportFile reportFile, long userId)
        {
            if (reportFile == null)
            {
                throw new ArgumentNullException(nameof(reportFile));
            }

            var reportFolderPath = _reportFolderPathProvider.GetReportFolderPath(reportBundle, userId);

            _fileWriter.Write(reportFolderPath, reportFile.FileName, reportFile.Content);
        }
        public string GetReportFolderPath([NotNull] ReportBundle reportBundle, long userId)
        {
            if (reportBundle == null)
            {
                throw new ArgumentNullException(nameof(reportBundle));
            }

            var reportPath = GetReportPath();

            var validReportName = reportBundle.Report.DisplayName.ToValidPath();

            var reportFilePath = Path.Combine(reportPath, validReportName);

            var reportUserLogin = GerReportUserName(userId).ToValidPath();

            reportFilePath = Path.Combine(reportFilePath, reportUserLogin);

            return(reportFilePath);
        }
 private ReportFile TranslateReport(ReportFileType reportFileType, ReportBundle reportBundle) =>
 _reportTranslationManager.Translate(reportBundle, reportFileType);
 private void SaveReportFileInTempStorage(long userId, ReportBundle reportBundle, ReportFile reportFile) =>
 _reportFileStorage.SaveReportFile(reportBundle, reportFile, userId);