public static IEnumerable <IIssue> ReadIssues(
            this ICakeContext context,
            IIssueProvider issueProvider,
            IReadIssuesSettings settings)
        {
            context.NotNull(nameof(context));
            issueProvider.NotNull(nameof(issueProvider));
            settings.NotNull(nameof(settings));

            return
                (context.ReadIssues(
                     new List <IIssueProvider> {
                issueProvider
            },
                     settings));
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="IssuesReader"/> class.
        /// </summary>
        /// <param name="log">Cake log instance.</param>
        /// <param name="issueProviders">List of issue providers to use.</param>
        /// <param name="settings">Settings to use.</param>
        public IssuesReader(
            ICakeLog log,
            IEnumerable <IIssueProvider> issueProviders,
            IReadIssuesSettings settings)
        {
            log.NotNull(nameof(log));
            settings.NotNull(nameof(settings));

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

            this.log      = log;
            this.settings = settings;

            // ReSharper disable once PossibleMultipleEnumeration
            this.issueProviders.AddRange(issueProviders);
        }
        public static IEnumerable <IIssue> ReadIssues(
            this ICakeContext context,
            IEnumerable <IIssueProvider> issueProviders,
            IReadIssuesSettings settings)
        {
            context.NotNull(nameof(context));
            settings.NotNull(nameof(settings));

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

            // ReSharper disable once PossibleMultipleEnumeration
            var issuesReader =
                new IssuesReader(context.Log, issueProviders, settings);

            return(issuesReader.ReadIssues());
        }