-
Notifications
You must be signed in to change notification settings - Fork 9.8k
/
EndpointConfiguration.cs
42 lines (35 loc) · 1.47 KB
/
EndpointConfiguration.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
31
32
33
34
35
36
37
38
39
40
41
42
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Https;
using Microsoft.Extensions.Configuration;
namespace Microsoft.AspNetCore.Server.Kestrel;
/// <summary>
/// The configuration for an endpoint.
/// </summary>
public class EndpointConfiguration
{
internal EndpointConfiguration(bool isHttps, ListenOptions listenOptions, HttpsConnectionAdapterOptions httpsOptions, IConfigurationSection configSection)
{
IsHttps = isHttps;
ListenOptions = listenOptions ?? throw new ArgumentNullException(nameof(listenOptions));
HttpsOptions = httpsOptions ?? throw new ArgumentNullException(nameof(httpsOptions));
ConfigSection = configSection ?? throw new ArgumentNullException(nameof(configSection));
}
/// <summary>
/// Gets whether the endpoint uses HTTPS.
/// </summary>
public bool IsHttps { get; }
/// <summary>
/// Gets the endpoint <see cref="ListenOptions"/>.
/// </summary>
public ListenOptions ListenOptions { get; }
/// <summary>
/// Gets the <see cref="HttpsConnectionAdapterOptions"/>.
/// </summary>
public HttpsConnectionAdapterOptions HttpsOptions { get; }
/// <summary>
/// Gets the <see cref="IConfigurationSection"/> for the endpoint.
/// </summary>
public IConfigurationSection ConfigSection { get; }
}