-
Notifications
You must be signed in to change notification settings - Fork 9.8k
/
IMultiplexedConnectionBuilder.cs
30 lines (25 loc) · 1.13 KB
/
IMultiplexedConnectionBuilder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Microsoft.AspNetCore.Connections;
/// <summary>
/// Defines an interface that provides the mechanisms to configure a connection pipeline.
/// </summary>
public interface IMultiplexedConnectionBuilder
{
/// <summary>
/// Gets the <see cref="IServiceProvider"/> that provides access to the application's service container.
/// </summary>
IServiceProvider ApplicationServices { get; }
/// <summary>
/// Adds a middleware delegate to the application's connection pipeline.
/// </summary>
/// <param name="middleware">The middleware delegate.</param>
/// <returns>The <see cref="IMultiplexedConnectionBuilder"/>.</returns>
IMultiplexedConnectionBuilder Use(Func<MultiplexedConnectionDelegate, MultiplexedConnectionDelegate> middleware);
/// <summary>
/// Builds the delegate used by this application to process connections.
/// </summary>
/// <returns>The connection handling delegate.</returns>
MultiplexedConnectionDelegate Build();
}