forked from bonesoul/uhttpsharp
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathIPipeline.cs
More file actions
22 lines (20 loc) · 853 Bytes
/
IPipeline.cs
File metadata and controls
22 lines (20 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System;
using System.Threading.Tasks;
using uhttpsharp.Handlers;
namespace uhttpsharp.Controllers
{
/// <summary>
/// Represents a series of functions and an entry point in which a function can be called at.
/// </summary>
public interface IPipeline
{
/// <summary>
/// Starts the pipeline.
/// An empty pipeline implementation will just return the task of the injected task function.
/// </summary>
/// <param name="injectedTask">The function to be called at the appropriate stage.</param>
/// <param name="context">The context in which this task will run (in case you need to check something before the actual task runs).</param>
/// <returns></returns>
Task<IControllerResponse> Go(Func<Task<IControllerResponse>> injectedTask, IHttpContext context);
}
}