forked from NpgsqlRest/NpgsqlRest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParameterValidationValues.cs
More file actions
51 lines (49 loc) · 1.82 KB
/
Copy pathParameterValidationValues.cs
File metadata and controls
51 lines (49 loc) · 1.82 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
using System.Text.Json.Nodes;
using Microsoft.Extensions.Primitives;
using Npgsql;
namespace NpgsqlRest;
public readonly struct ParameterValidationValues(
HttpContext context,
Routine routine,
NpgsqlRestParameter parameter,
string paramName,
TypeDescriptor typeDescriptor,
RequestParamType requestParamType,
StringValues? queryStringValues,
JsonNode? jsonBodyNode)
{
/// <summary>
/// Current HttpContext.
/// </summary>
public readonly HttpContext Context = context;
/// <summary>
/// Current Routine.
/// </summary>
public readonly Routine Routine = routine;
/// <summary>
/// Parameter to be validated. Note: if parameter is using default value and value not provided, parameter.Value is null.
/// </summary>
public readonly NpgsqlRestParameter Parameter = parameter;
/// <summary>
/// Current parameter name (converted).
/// </summary>
public readonly string ParamName = paramName;
/// <summary>
/// Current parameter type descriptor (additional type information)
/// </summary>
public readonly TypeDescriptor TypeDescriptor = typeDescriptor;
/// <summary>
/// Current parameter position Query String or JSON Body.
/// </summary>
public readonly RequestParamType RequestParamType = requestParamType;
/// <summary>
/// Current parameter values from Query String.
/// NULL if parameter is not from Query String or Query String is not provided and parameter has default.
/// </summary>
public readonly StringValues? QueryStringValues = queryStringValues;
/// <summary>
/// Current parameter values from JSON Body.
/// NULL if parameter is not from JSON Body or JSON Body is not provided and parameter has default.
/// </summary>
public readonly JsonNode? JsonBodyNode = jsonBodyNode;
}