/
ParameterValue.cs
35 lines (31 loc) · 1.09 KB
/
ParameterValue.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
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Components
{
/// <summary>
/// Represents a single parameter supplied to an <see cref="IComponent"/>
/// by its parent in the render tree.
/// </summary>
public readonly struct ParameterValue
{
internal ParameterValue(string name, object value, bool cascading)
{
Name = name;
Value = value;
Cascading = cascading;
}
/// <summary>
/// Gets the name of the parameter.
/// </summary>
public string Name { get; }
/// <summary>
/// Gets the value being supplied for the parameter.
/// </summary>
public object Value { get; }
/// <summary>
/// Gets a value to indicate whether the parameter is cascading, meaning that it
/// was supplied by a <see cref="CascadingValue{T}"/>.
/// </summary>
public bool Cascading { get; }
}
}