feat: made PipelineBase.AddDependency be a params
This commit is contained in:
parent
084aa7e812
commit
a8c6d0e582
6 changed files with 33 additions and 17 deletions
|
@ -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; }
|
||||
|
|
|
@ -4,9 +4,9 @@ This assembly contains the primary system for reading and writing from the disk,
|
|||
along with various processes to manipulate paths. It contains three primary
|
||||
components:
|
||||
|
||||
- File System I/O
|
||||
- Path Normalization
|
||||
- Disk-Based Content
|
||||
- File System I/O
|
||||
- Path Normalization
|
||||
- Disk-Based Content
|
||||
|
||||
## File System I/O
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ public class IdentifyMarkdownFromPath : IdentifyMarkdown
|
|||
{
|
||||
return (path.GetExtensionWithDot() ?? string.Empty).ToLowerInvariant()
|
||||
switch
|
||||
{
|
||||
".md" => true,
|
||||
".markdown" => true,
|
||||
_ => false,
|
||||
};
|
||||
{
|
||||
".md" => true,
|
||||
".markdown" => true,
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
this.dependencies.Add(pipeline);
|
||||
foreach (IPipeline pipeline in pipelines)
|
||||
{
|
||||
this.dependencies.Add(pipeline);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
## Immediate
|
||||
|
||||
- Switch the various operations to be async
|
||||
- ReadFiles
|
||||
- WriteFiles
|
||||
- Implement mime type determination
|
||||
- Implement a convert to text content based on mime type
|
||||
- Switch the various operations to be async
|
||||
- ReadFiles
|
||||
- WriteFiles
|
||||
- Implement mime type determination
|
||||
- Implement a convert to text content based on mime type
|
||||
|
|
Reference in a new issue