/// <summary> /// Construct a <see cref="PayloadProcessor"/> /// </summary> /// <param name="generalConfigurationOptions">The <see cref="IOptions{TOptions}"/> containing the value of <see cref="generalConfiguration"/></param> /// <param name="serviceProvider">The value of <see cref="serviceProvider"/></param> /// <param name="logger">The value of <see cref="logger"/></param> /// <param name="stringLocalizer">The value of <see cref="stringLocalizer"/></param> /// <param name="backgroundJobClient">The value of <see cref="backgroundJobClient"/></param> /// <param name="diffGenerator">The value of <see cref="diffGenerator"/></param> public PayloadProcessor(IOptions <GeneralConfiguration> generalConfigurationOptions, IServiceProvider serviceProvider, ILogger <PayloadProcessor> logger, IStringLocalizer <PayloadProcessor> stringLocalizer, IBackgroundJobClient backgroundJobClient, IDiffGenerator diffGenerator) { generalConfiguration = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions)); this.serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.stringLocalizer = stringLocalizer ?? throw new ArgumentNullException(nameof(stringLocalizer)); this.backgroundJobClient = backgroundJobClient ?? throw new ArgumentNullException(nameof(backgroundJobClient)); this.diffGenerator = diffGenerator ?? throw new ArgumentNullException(nameof(diffGenerator)); }
/// <summary> /// Construct a <see cref="PayloadProcessor"/> /// </summary> /// <param name="gitHubConfigurationOptions">The <see cref="IOptions{TOptions}"/> containing the value of <see cref="gitHubConfiguration"/></param> /// <param name="serviceProvider">The value of <see cref="serviceProvider"/></param> /// <param name="ioManager">The value of <see cref="ioManager"/></param> /// <param name="logger">The value of <see cref="logger"/></param> /// <param name="stringLocalizer">The value of <see cref="stringLocalizer"/></param> /// <param name="backgroundJobClient">The value of <see cref="backgroundJobClient"/></param> /// <param name="diffGenerator">The value of <see cref="diffGenerator"/></param> public PayloadProcessor(IOptions <GitHubConfiguration> gitHubConfigurationOptions, IServiceProvider serviceProvider, IIOManager ioManager, ILogger <PayloadProcessor> logger, IStringLocalizer <PayloadProcessor> stringLocalizer, IBackgroundJobClient backgroundJobClient, IDiffGenerator diffGenerator) { gitHubConfiguration = gitHubConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(gitHubConfigurationOptions)); this.ioManager = new ResolvingIOManager(ioManager ?? throw new ArgumentNullException(nameof(ioManager)), WorkingDirectory); this.serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.stringLocalizer = stringLocalizer ?? throw new ArgumentNullException(nameof(stringLocalizer)); this.backgroundJobClient = backgroundJobClient ?? throw new ArgumentNullException(nameof(backgroundJobClient)); this.diffGenerator = diffGenerator ?? throw new ArgumentNullException(nameof(diffGenerator)); }
public static void Test(IDiffGenerator generator) { generator.DisplayDifference(string.Join(Environment.NewLine, testOriginalTextLines), string.Join(Environment.NewLine, testModifiedTextLines)); }