This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-nitride-cil/src/MfGames.Nitride/Pipelines/PipelineBase.cs
D. Moonfire 9e93eb6ce6 refactor!: fixed missed namespaces
- reformatted code and cleaned up references
2023-01-14 18:19:42 -06:00

43 lines
890 B
C#

using System.Collections.Generic;
using MfGames.Gallium;
namespace MfGames.Nitride.Pipelines;
/// <summary>
/// A basic pipeline that is configured through properties and methods.
/// </summary>
public abstract class PipelineBase : IPipeline
{
private readonly List<IPipeline> dependencies;
protected PipelineBase()
{
this.dependencies = new List<IPipeline>();
}
public PipelineBase AddDependency(IPipeline pipeline)
{
this.dependencies.Add(pipeline);
return this;
}
/// <inheritdoc />
public IEnumerable<IPipeline> GetDependencies()
{
return this.dependencies;
}
/// <inheritdoc />
public abstract IAsyncEnumerable<Entity> RunAsync(
IEnumerable<Entity> entities);
/// <inheritdoc />
public override string ToString()
{
return this.GetType()
.Name;
}
}