-
Notifications
You must be signed in to change notification settings - Fork 234
/
Copy pathVariableDetailsBase.cs
56 lines (48 loc) · 1.91 KB
/
VariableDetailsBase.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.Extensions.Logging;
namespace Microsoft.PowerShell.EditorServices.Services.DebugAdapter
{
/// <summary>
/// Defines the common details between a variable and a variable container such as a scope
/// in the current debugging session.
/// </summary>
internal abstract class VariableDetailsBase
{
/// <summary>
/// Provides a constant that is used as the starting variable ID for all.
/// Avoid 0 as it indicates a variable node with no children.
/// variables.
/// </summary>
public const int FirstVariableId = 1;
/// <summary>
/// Gets the numeric ID of the variable which can be used to refer
/// to it in future requests.
/// </summary>
public int Id { get; set; }
/// <summary>
/// Gets the variable's name.
/// </summary>
public string Name { get; protected set; }
/// <summary>
/// Gets the string representation of the variable's value.
/// If the variable is an expandable object, this string
/// will be empty.
/// </summary>
public string ValueString { get; protected set; }
/// <summary>
/// Gets the type of the variable's value.
/// </summary>
public string Type { get; protected set; }
/// <summary>
/// Returns true if the variable's value is expandable, meaning
/// that it has child properties or its contents can be enumerated.
/// </summary>
public bool IsExpandable { get; protected set; }
/// <summary>
/// If this variable instance is expandable, this method returns the
/// details of its children. Otherwise it returns an empty array.
/// </summary>
public abstract VariableDetailsBase[] GetChildren(ILogger logger);
}
}