Initial commit of SqlTools Service API

This commit is contained in:
Karl Burtram
2016-07-15 11:02:03 -07:00
parent 874ade9001
commit 790825cfab
112 changed files with 9782 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class AttachRequest
{
public static readonly
RequestType<AttachRequestArguments, object> Type =
RequestType<AttachRequestArguments, object>.Create("attach");
}
public class AttachRequestArguments
{
public string Address { get; set; }
public int Port { get; set; }
}
}

View File

@@ -0,0 +1,81 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Utility;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class Breakpoint
{
/// <summary>
/// Gets an boolean indicator that if true, breakpoint could be set
/// (but not necessarily at the desired location).
/// </summary>
public bool Verified { get; set; }
/// <summary>
/// Gets an optional message about the state of the breakpoint. This is shown to the user
/// and can be used to explain why a breakpoint could not be verified.
/// </summary>
public string Message { get; set; }
public string Source { get; set; }
public int? Line { get; set; }
public int? Column { get; set; }
private Breakpoint()
{
}
#if false
public static Breakpoint Create(
BreakpointDetails breakpointDetails)
{
//Validate.IsNotNull(nameof(breakpointDetails), breakpointDetails);
return new Breakpoint
{
Verified = breakpointDetails.Verified,
Message = breakpointDetails.Message,
Source = breakpointDetails.Source,
Line = breakpointDetails.LineNumber,
Column = breakpointDetails.ColumnNumber
};
}
public static Breakpoint Create(
CommandBreakpointDetails breakpointDetails)
{
//Validate.IsNotNull(nameof(breakpointDetails), breakpointDetails);
return new Breakpoint {
Verified = breakpointDetails.Verified,
Message = breakpointDetails.Message
};
}
#endif
public static Breakpoint Create(
SourceBreakpoint sourceBreakpoint,
string source,
string message,
bool verified = false)
{
Validate.IsNotNull(nameof(sourceBreakpoint), sourceBreakpoint);
Validate.IsNotNull(nameof(source), source);
Validate.IsNotNull(nameof(message), message);
return new Breakpoint {
Verified = verified,
Message = message,
Source = source,
Line = sourceBreakpoint.Line,
Column = sourceBreakpoint.Column
};
}
}
}

View File

@@ -0,0 +1,16 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class ConfigurationDoneRequest
{
public static readonly
RequestType<object, object> Type =
RequestType<object, object>.Create("configurationDone");
}
}

View File

@@ -0,0 +1,17 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class ContinueRequest
{
public static readonly
RequestType<object, object> Type =
RequestType<object, object>.Create("continue");
}
}

View File

@@ -0,0 +1,17 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class DisconnectRequest
{
public static readonly
RequestType<object, object> Type =
RequestType<object, object>.Create("disconnect");
}
}

View File

@@ -0,0 +1,53 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class EvaluateRequest
{
public static readonly
RequestType<EvaluateRequestArguments, EvaluateResponseBody> Type =
RequestType<EvaluateRequestArguments, EvaluateResponseBody>.Create("evaluate");
}
public class EvaluateRequestArguments
{
/// <summary>
/// The expression to evaluate.
/// </summary>
public string Expression { get; set; }
/// <summary>
/// The context in which the evaluate request is run. Possible
/// values are 'watch' if evaluate is run in a watch or 'repl'
/// if run from the REPL console.
/// </summary>
public string Context { get; set; }
/// <summary>
/// Evaluate the expression in the context of this stack frame.
/// If not specified, the top most frame is used.
/// </summary>
public int FrameId { get; set; }
}
public class EvaluateResponseBody
{
/// <summary>
/// The evaluation result.
/// </summary>
public string Result { get; set; }
/// <summary>
/// If variablesReference is > 0, the evaluate result is
/// structured and its children can be retrieved by passing
/// variablesReference to the VariablesRequest
/// </summary>
public int VariablesReference { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class ExitedEvent
{
public static readonly
EventType<ExitedEventBody> Type =
EventType<ExitedEventBody>.Create("exited");
}
public class ExitedEventBody
{
public int ExitCode { get; set; }
}
}

View File

@@ -0,0 +1,56 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class InitializeRequest
{
public static readonly
RequestType<InitializeRequestArguments, InitializeResponseBody> Type =
RequestType<InitializeRequestArguments, InitializeResponseBody>.Create("initialize");
}
public class InitializeRequestArguments
{
public string AdapterId { get; set; }
public bool LinesStartAt1 { get; set; }
public string PathFormat { get; set; }
public bool SourceMaps { get; set; }
public string GeneratedCodeDirectory { get; set; }
}
public class InitializeResponseBody
{
/// <summary>
/// Gets or sets a boolean value that determines whether the debug adapter
/// supports the configurationDoneRequest.
/// </summary>
public bool SupportsConfigurationDoneRequest { get; set; }
/// <summary>
/// Gets or sets a boolean value that determines whether the debug adapter
/// supports functionBreakpoints.
/// </summary>
public bool SupportsFunctionBreakpoints { get; set; }
/// <summary>
/// Gets or sets a boolean value that determines whether the debug adapter
/// supports conditionalBreakpoints.
/// </summary>
public bool SupportsConditionalBreakpoints { get; set; }
/// <summary>
/// Gets or sets a boolean value that determines whether the debug adapter
/// supports a (side effect free) evaluate request for data hovers.
/// </summary>
public bool SupportsEvaluateForHovers { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class InitializedEvent
{
public static readonly
EventType<object> Type =
EventType<object>.Create("initialized");
}
}

View File

@@ -0,0 +1,66 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Collections.Generic;
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class LaunchRequest
{
public static readonly
RequestType<LaunchRequestArguments, object> Type =
RequestType<LaunchRequestArguments, object>.Create("launch");
}
public class LaunchRequestArguments
{
/// <summary>
/// Gets or sets the absolute path to the program to debug.
/// </summary>
public string Program { get; set; }
/// <summary>
/// Gets or sets a boolean value that indicates whether the script should be
/// run with (false) or without (true) debugging support.
/// </summary>
public bool NoDebug { get; set; }
/// <summary>
/// Gets or sets a boolean value that determines whether to automatically stop
/// target after launch. If not specified, target does not stop.
/// </summary>
public bool StopOnEntry { get; set; }
/// <summary>
/// Gets or sets optional arguments passed to the debuggee.
/// </summary>
public string[] Args { get; set; }
/// <summary>
/// Gets or sets the working directory of the launched debuggee (specified as an absolute path).
/// If omitted the debuggee is lauched in its own directory.
/// </summary>
public string Cwd { get; set; }
/// <summary>
/// Gets or sets the absolute path to the runtime executable to be used.
/// Default is the runtime executable on the PATH.
/// </summary>
public string RuntimeExecutable { get; set; }
/// <summary>
/// Gets or sets the optional arguments passed to the runtime executable.
/// </summary>
public string[] RuntimeArgs { get; set; }
/// <summary>
/// Gets or sets optional environment variables to pass to the debuggee. The string valued
/// properties of the 'environmentVariables' are used as key/value pairs.
/// </summary>
public Dictionary<string, string> Env { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
// /** StepOver request; value of command field is "next".
// he request starts the debuggee to run again for one step.
// penDebug will respond with a StoppedEvent (event type 'step') after running the step.
public class NextRequest
{
public static readonly
RequestType<object, object> Type =
RequestType<object, object>.Create("next");
}
}

View File

@@ -0,0 +1,24 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class OutputEvent
{
public static readonly
EventType<OutputEventBody> Type =
EventType<OutputEventBody>.Create("output");
}
public class OutputEventBody
{
public string Category { get; set; }
public string Output { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class PauseRequest
{
public static readonly
RequestType<object, object> Type =
RequestType<object, object>.Create("pause");
}
}

View File

@@ -0,0 +1,40 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class Scope
{
/// <summary>
/// Gets or sets the name of the scope (as such 'Arguments', 'Locals')
/// </summary>
public string Name { get; set; }
/// <summary>
/// Gets or sets the variables of this scope can be retrieved by passing the
/// value of variablesReference to the VariablesRequest.
/// </summary>
public int VariablesReference { get; set; }
/// <summary>
/// Gets or sets a boolean value indicating if number of variables in
/// this scope is large or expensive to retrieve.
/// </summary>
public bool Expensive { get; set; }
#if false
public static Scope Create(VariableScope scope)
{
return new Scope {
Name = scope.Name,
VariablesReference = scope.Id,
// Temporary fix for #95 to get debug hover tips to work well at least for the local scope.
Expensive = (scope.Name != VariableContainerDetails.LocalScopeName)
};
}
#endif
}
}

View File

@@ -0,0 +1,29 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Diagnostics;
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class ScopesRequest
{
public static readonly
RequestType<ScopesRequestArguments, ScopesResponseBody> Type =
RequestType<ScopesRequestArguments, ScopesResponseBody>.Create("scopes");
}
[DebuggerDisplay("FrameId = {FrameId}")]
public class ScopesRequestArguments
{
public int FrameId { get; set; }
}
public class ScopesResponseBody
{
public Scope[] Scopes { get; set; }
}
}

View File

@@ -0,0 +1,43 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
/// <summary>
/// SetBreakpoints request; value of command field is "setBreakpoints".
/// Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.
/// To clear all breakpoint for a source, specify an empty array.
/// When a breakpoint is hit, a StoppedEvent (event type 'breakpoint') is generated.
/// </summary>
public class SetBreakpointsRequest
{
public static readonly
RequestType<SetBreakpointsRequestArguments, SetBreakpointsResponseBody> Type =
RequestType<SetBreakpointsRequestArguments, SetBreakpointsResponseBody>.Create("setBreakpoints");
}
public class SetBreakpointsRequestArguments
{
public Source Source { get; set; }
public SourceBreakpoint[] Breakpoints { get; set; }
}
public class SourceBreakpoint
{
public int Line { get; set; }
public int? Column { get; set; }
public string Condition { get; set; }
}
public class SetBreakpointsResponseBody
{
public Breakpoint[] Breakpoints { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
/// <summary>
/// SetExceptionBreakpoints request; value of command field is "setExceptionBreakpoints".
/// Enable that the debuggee stops on exceptions with a StoppedEvent (event type 'exception').
/// </summary>
public class SetExceptionBreakpointsRequest
{
public static readonly
RequestType<SetExceptionBreakpointsRequestArguments, object> Type =
RequestType<SetExceptionBreakpointsRequestArguments, object>.Create("setExceptionBreakpoints");
}
/// <summary>
/// Arguments for "setExceptionBreakpoints" request.
/// </summary>
public class SetExceptionBreakpointsRequestArguments
{
/// <summary>
/// Gets or sets the names of enabled exception breakpoints.
/// </summary>
public string[] Filters { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class SetFunctionBreakpointsRequest
{
public static readonly
RequestType<SetFunctionBreakpointsRequestArguments, SetBreakpointsResponseBody> Type =
RequestType<SetFunctionBreakpointsRequestArguments, SetBreakpointsResponseBody>.Create("setFunctionBreakpoints");
}
public class SetFunctionBreakpointsRequestArguments
{
public FunctionBreakpoint[] Breakpoints { get; set; }
}
public class FunctionBreakpoint
{
/// <summary>
/// Gets or sets the name of the function to break on when it is invoked.
/// </summary>
public string Name { get; set; }
public string Condition { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class Source
{
public string Name { get; set; }
public string Path { get; set; }
public int? SourceReference { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class SourceRequest
{
public static readonly
RequestType<SourceRequestArguments, SourceResponseBody> Type =
RequestType<SourceRequestArguments, SourceResponseBody>.Create("source");
}
public class SourceRequestArguments
{
/// <summary>
/// Gets or sets the reference to the source. This is the value received in Source.reference.
/// </summary>
public int SourceReference { get; set; }
}
public class SourceResponseBody
{
public string Content { get; set; }
}
}

View File

@@ -0,0 +1,53 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class StackFrame
{
public int Id { get; set; }
public string Name { get; set; }
public Source Source { get; set; }
public int Line { get; set; }
public int Column { get; set; }
// /** An identifier for the stack frame. */
//id: number;
///** The name of the stack frame, typically a method name */
//name: string;
///** The source of the frame. */
//source: Source;
///** The line within the file of the frame. */
//line: number;
///** The column within the line. */
//column: number;
///** All arguments and variables declared in this stackframe. */
//scopes: Scope[];
#if false
public static StackFrame Create(
StackFrameDetails stackFrame,
int id)
{
return new StackFrame
{
Id = id,
Name = stackFrame.FunctionName,
Line = stackFrame.LineNumber,
Column = stackFrame.ColumnNumber,
Source = new Source
{
Path = stackFrame.ScriptPath
}
};
}
#endif
}
}

View File

@@ -0,0 +1,33 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Diagnostics;
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class StackTraceRequest
{
public static readonly
RequestType<StackTraceRequestArguments, StackTraceResponseBody> Type =
RequestType<StackTraceRequestArguments, StackTraceResponseBody>.Create("stackTrace");
}
[DebuggerDisplay("ThreadId = {ThreadId}, Levels = {Levels}")]
public class StackTraceRequestArguments
{
public int ThreadId { get; private set; }
/// <summary>
/// Gets the maximum number of frames to return. If levels is not specified or 0, all frames are returned.
/// </summary>
public int Levels { get; private set; }
}
public class StackTraceResponseBody
{
public StackFrame[] StackFrames { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class StartedEvent
{
public static readonly
EventType<object> Type =
EventType<object>.Create("started");
}
}

View File

@@ -0,0 +1,17 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class StepInRequest
{
public static readonly
RequestType<object, object> Type =
RequestType<object, object>.Create("stepIn");
}
}

View File

@@ -0,0 +1,16 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class StepOutRequest
{
public static readonly
RequestType<object, object> Type =
RequestType<object, object>.Create("stepOut");
}
}

View File

@@ -0,0 +1,41 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class StoppedEvent
{
public static readonly
EventType<StoppedEventBody> Type =
EventType<StoppedEventBody>.Create("stopped");
}
public class StoppedEventBody
{
/// <summary>
/// A value such as "step", "breakpoint", "exception", or "pause"
/// </summary>
public string Reason { get; set; }
/// <summary>
/// Gets or sets the current thread ID, if any.
/// </summary>
public int? ThreadId { get; set; }
public Source Source { get; set; }
public int Line { get; set; }
public int Column { get; set; }
/// <summary>
/// Gets or sets additional information such as an error message.
/// </summary>
public string Text { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class TerminatedEvent
{
public static readonly
EventType<object> Type =
EventType<object>.Create("terminated");
}
}

View File

@@ -0,0 +1,15 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class Thread
{
public int Id { get; set; }
public string Name { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class ThreadsRequest
{
public static readonly
RequestType<object, ThreadsResponseBody> Type =
RequestType<object, ThreadsResponseBody>.Create("threads");
}
public class ThreadsResponseBody
{
public Thread[] Threads { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class Variable
{
public string Name { get; set; }
// /** The variable's value. For structured objects this can be a multi line text, e.g. for a function the body of a function. */
public string Value { get; set; }
// /** If variablesReference is > 0, the variable is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. */
public int VariablesReference { get; set; }
#if false
public static Variable Create(VariableDetailsBase variable)
{
return new Variable
{
Name = variable.Name,
Value = variable.ValueString ?? string.Empty,
VariablesReference =
variable.IsExpandable ?
variable.Id : 0
};
}
#endif
}
}

View File

@@ -0,0 +1,29 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Diagnostics;
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
{
public class VariablesRequest
{
public static readonly
RequestType<VariablesRequestArguments, VariablesResponseBody> Type =
RequestType<VariablesRequestArguments, VariablesResponseBody>.Create("variables");
}
[DebuggerDisplay("VariablesReference = {VariablesReference}")]
public class VariablesRequestArguments
{
public int VariablesReference { get; set; }
}
public class VariablesResponseBody
{
public Variable[] Variables { get; set; }
}
}