feat: made PipelineBase.AddDependency be a params

This commit is contained in:
D. Moonfire 2023-01-15 12:20:41 -06:00
parent 084aa7e812
commit a8c6d0e582
6 changed files with 33 additions and 17 deletions

View file

@ -25,7 +25,10 @@ public class ForEachHandlebarsBlock<TModel> : HandlebarsBlockBase
/// </summary>
public Action<EncodedTextWriter, BlockHelperOptions, Context, Arguments>?
NothingFound
{ get; set; }
{
get;
set;
}
/// <inheritdoc />
protected override string HelperName { get; }

View file

@ -32,7 +32,10 @@ public class ParseYamlHeader<TModel> : OperationBase
public Func<Entity, string, Exception, ParseYamlHeaderErrorHandling>?
EntityError
{ get; set; }
{
get;
set;
}
/// <summary>
/// Gets or sets a value indicating whether the header should be removed

View file

@ -16,9 +16,19 @@ public abstract class PipelineBase : IPipeline
this.dependencies = new List<IPipeline>();
}
public PipelineBase AddDependency(IPipeline pipeline)
/// <summary>
/// Adds one or more pipeline dependencies into the current one. All of
/// the dependencies are guaranteed to run before this pipeline's RunAsync
/// is called.
/// </summary>
/// <param name="pipelines">The pipelines to add as a dependency.</param>
/// <returns>The same object for chaining operations.</returns>
public PipelineBase AddDependency(params IPipeline[] pipelines)
{
foreach (IPipeline pipeline in pipelines)
{
this.dependencies.Add(pipeline);
}
return this;
}