-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpClientHintsMiddlewareConfig.cs
More file actions
51 lines (46 loc) · 1.83 KB
/
HttpClientHintsMiddlewareConfig.cs
File metadata and controls
51 lines (46 loc) · 1.83 KB
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
43
44
45
46
47
48
49
50
51
// Copyright © https://myCSharp.de - all rights reserved
namespace MyCSharp.HttpClientHints.AspNetCore;
/// <summary>
/// Configuration options for the HTTP client hints middleware.
/// </summary>
public class HttpClientHintsMiddlewareConfig
{
/// <summary>
/// Gets or sets the response header used to convey HTTP client hints.
/// </summary>
/// <value>The name of the response header as a <see cref="string"/>.</value>
/// <remarks>These settings are set by <see cref="HttpClientHintsRegistration"/>. Do not set these values manually.</remarks>
public required string ResponseHeader
{
get;
set
{
field = value;
HasResponseHeaders = string.IsNullOrEmpty(value) is false;
}
}
/// <summary>
/// Gets a value indicating whether the response headers have been configured.
/// </summary>
/// <value><c>true</c> if response headers are configured; otherwise, <c>false</c>.</value>
public bool HasResponseHeaders { get; internal set; }
/// <summary>
/// Gets or sets the lifetime of the client hints in seconds.
/// </summary>
/// <value>A <see cref="string"/> containing an <see cref="int"/> representing the lifetime in seconds, or <c>null</c> if unspecified.</value>
/// <remarks>These settings are set by <see cref="HttpClientHintsRegistration"/>. Do not set these values manually.</remarks>
public string? LifeTime
{
get;
set
{
field = value;
HasLifetime = string.IsNullOrEmpty(value) is false;
}
}
/// <summary>
/// Gets a value indicating whether the lifetime for client hints has been configured.
/// </summary>
/// <value><c>true</c> if lifetime is configured; otherwise, <c>false</c>.</value>
public bool HasLifetime { get; internal set; }
}