/// <summary> /// Initializes a new instance of the <see cref="GenericIssueReportGenerator"/> class. /// </summary> /// <param name="log">The Cake log context.</param> /// <param name="settings">Settings for reading the log file.</param> public GenericIssueReportGenerator(ICakeLog log, GenericIssueReportFormatSettings settings) : base(log) { settings.NotNull(nameof(settings)); this.genericIssueReportFormatSettings = settings; }
/// <summary> /// Adds an option which should be passed to the template. /// </summary> /// <param name="settings">The settings.</param> /// <param name="key">Option which should be set.</param> /// <param name="value">Value of the option.</param> /// <returns>The <paramref name="settings"/> instance with option added to <see cref="GenericIssueReportFormatSettings.Options"/>.</returns> public static GenericIssueReportFormatSettings WithOption(this GenericIssueReportFormatSettings settings, Enum key, object value) { settings.NotNull(nameof(settings)); settings.Options.Add(key.ToString(), value); return(settings); }
public static IIssueReportFormat GenericIssueReportFormatFromEmbeddedTemplate( this ICakeContext context, GenericIssueReportTemplate template) { context.NotNull(nameof(context)); return(context.GenericIssueReportFormat(GenericIssueReportFormatSettings.FromEmbeddedTemplate(template))); }
public static IIssueReportFormat GenericIssueReportFormat( this ICakeContext context, GenericIssueReportFormatSettings settings) { context.NotNull(nameof(context)); settings.NotNull(nameof(settings)); return(new GenericIssueReportGenerator(context.Log, settings)); }
public static IIssueReportFormat GenericIssueReportFormatFromContent( this ICakeContext context, string templateContent) { context.NotNull(nameof(context)); templateContent.NotNullOrWhiteSpace(nameof(templateContent)); return(context.GenericIssueReportFormat(GenericIssueReportFormatSettings.FromContent(templateContent))); }
public static IIssueReportFormat GenericIssueReportFormatFromFilePath( this ICakeContext context, FilePath templatePath) { context.NotNull(nameof(context)); templatePath.NotNull(nameof(templatePath)); return(context.GenericIssueReportFormat(GenericIssueReportFormatSettings.FromFilePath(templatePath))); }
public static IIssueReportFormat GenericIssueReportFormatFromEmbeddedTemplate( this ICakeContext context, GenericIssueReportTemplate template, Action <GenericIssueReportFormatSettings> configurator) { context.NotNull(nameof(context)); configurator.NotNull(nameof(configurator)); var settings = GenericIssueReportFormatSettings.FromEmbeddedTemplate(template); configurator(settings); return(context.GenericIssueReportFormat(settings)); }
public static IIssueReportFormat GenericIssueReportFormatFromContent( this ICakeContext context, string templateContent, Action <GenericIssueReportFormatSettings> configurator) { context.NotNull(nameof(context)); templateContent.NotNullOrWhiteSpace(nameof(templateContent)); configurator.NotNull(nameof(configurator)); var settings = GenericIssueReportFormatSettings.FromContent(templateContent); configurator(settings); return(context.GenericIssueReportFormat(settings)); }
public static IIssueReportFormat GenericIssueReportFormatFromFilePath( this ICakeContext context, FilePath templatePath, Action <GenericIssueReportFormatSettings> configurator) { context.NotNull(nameof(context)); templatePath.NotNull(nameof(templatePath)); configurator.NotNull(nameof(configurator)); var settings = GenericIssueReportFormatSettings.FromFilePath(templatePath); configurator(settings); return(context.GenericIssueReportFormat(settings)); }