Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="IssueReportCreator"/> class.
        /// </summary>
        /// <param name="log">Cake log instance.</param>
        /// <param name="settings">Settings to use.</param>
        public IssueReportCreator(
            ICakeLog log,
            CreateIssueReportSettings settings)
        {
            log.NotNull(nameof(log));
            settings.NotNull(nameof(settings));

            this.log      = log;
            this.settings = settings;
        }
Esempio n. 2
0
        public static FilePath CreateIssueReport(
            this ICakeContext context,
            IIssueProvider issueProvider,
            IIssueReportFormat reportFormat,
            CreateIssueReportSettings settings)
        {
            context.NotNull(nameof(context));
            reportFormat.NotNull(nameof(reportFormat));

            issueProvider.NotNull(nameof(issueProvider));

            var issueReportCreator = new IssueReportCreator(context.Log, settings);

            return(issueReportCreator.CreateReport(new List <IIssueProvider> {
                issueProvider
            }, reportFormat));
        }
Esempio n. 3
0
        public static FilePath CreateIssueReport(
            this ICakeContext context,
            IEnumerable <IIssueProvider> issueProviders,
            IIssueReportFormat reportFormat,
            CreateIssueReportSettings settings)
        {
            context.NotNull(nameof(context));
            reportFormat.NotNull(nameof(reportFormat));

            // ReSharper disable once PossibleMultipleEnumeration
            issueProviders.NotNullOrEmptyOrEmptyElement(nameof(issueProviders));

            var issueReportCreator = new IssueReportCreator(context.Log, settings);

            // ReSharper disable once PossibleMultipleEnumeration
            return(issueReportCreator.CreateReport(issueProviders, reportFormat));
        }