-
Notifications
You must be signed in to change notification settings - Fork 275
Expand file tree
/
Copy pathHeaderExpression.cs
More file actions
36 lines (32 loc) · 1.04 KB
/
HeaderExpression.cs
File metadata and controls
36 lines (32 loc) · 1.04 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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
namespace Microsoft.OpenApi
{
/// <summary>
/// Header expression, The token identifier in header is case-insensitive.
/// </summary>
public class HeaderExpression : SourceExpression
{
/// <summary>
/// header. string
/// </summary>
public const string Header = "header.";
/// <summary>
/// Initializes a new instance of the <see cref="HeaderExpression"/> class.
/// </summary>
/// <param name="token">The token string, it's case-insensitive.</param>
public HeaderExpression(string token)
: base(token)
{
Utils.CheckArgumentNullOrEmpty(token);
}
/// <summary>
/// Gets the expression string.
/// </summary>
public override string Expression { get => Header + Value; }
/// <summary>
/// Gets the token string.
/// </summary>
public string? Token { get => Value; }
}
}