diff --git a/Directory.Build.props b/Directory.Build.props
index b55d07820..5e69a2809 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -22,9 +22,11 @@
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb$(AllowedReferenceRelatedFileExtensions);.pdb
+
+ true
+
-
-
+
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 607d9460f..86b35bc7a 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,12 +1,8 @@
- true$(BaseIntermediateOutputPath)\GeneratedFiles
-
-
-
diff --git a/benchmarks/Pipeline/Pipeline.csproj b/benchmarks/Pipeline/Pipeline.csproj
index f9f41c6c0..15cca63e3 100644
--- a/benchmarks/Pipeline/Pipeline.csproj
+++ b/benchmarks/Pipeline/Pipeline.csproj
@@ -1,7 +1,7 @@
- net472;netcoreapp2.1;netcoreapp3.1
+ net472;netcoreapp3.1Exefalse
diff --git a/docs/lsp.md b/docs/lsp.md
index 8a9cdda14..4d393cc98 100644
--- a/docs/lsp.md
+++ b/docs/lsp.md
@@ -4,7 +4,19 @@ The goal of this library is to implement [Language Server Protocol](https://micr
Included in this library is a full-fidelity `LanguageServer` but also full `LanguageClient` implementation that could be implemented in an editor, but mainly it is used to help make Unit Testing easier, more consistent (and maybe even fun!).
-# Creating a JsonRpcServer
+# Concepts
+The language server is built oin a few concepts. At it's core is the [MediatR](https://github.com/jbogard/MediatR) library that you will build language specific handlers around. Around that core is a bunch of knowledge of the LSP protocol
+with the goal of making it more ".NET" like and less protocol centric.
+
+LSP revolves around features ( eg Completion, Hover, etc ) that define the inputs (request object) the outputs (response object) as well as Client Capabilities and Server Registration Options.
+
+## Client Capabilities
+These determine what features are supported by the client, and each has a different set of capabilities. The [specification](https://microsoft.github.io/language-server-protocol/) explains each feature and the requirements of each.
+
+## Server Registration Options
+The protocol defines two kinds of registration, static and dynamic. Dynamic registration, when it's supported, allows you to register features with the client on demand. Static registration is returned to the client during the initialization phase that explains what features the server supports. Dynamic and Static registration cannot be mixed. If you register something statically, you cannot register the same thing dynamically, otherwise the client will register both features twice.
+
+# Creating a Language Server or Client
`LanguageServer` or `LanguageClient` can be created through two methods.
## Standalone
diff --git a/docs/source-generation.md b/docs/source-generation.md
new file mode 100644
index 000000000..717bc2480
--- /dev/null
+++ b/docs/source-generation.md
@@ -0,0 +1,824 @@
+# Source Generators
+We have built a few source generators to help with aid with implementing the plumbing of all the things. The goals of using source generation this way is to ensure that errors and mistakes are avoided and don't cause issues.
+
+## Auto Implementation Properties
+The following interfaces will automatically implement themselves so you don't have to worry about it.
+
+* `IWorkDoneProgressParams`
+* `IPartialItemsRequest`
+* `IPartialItemRequest`
+* `ITextDocumentRegistrationOptions`
+* `IWorkDoneProgressOptions`
+* `IStaticRegistrationOptions`
+
+## JSON RPC Generation Attributes
+
+The general JSON RPC Attributes have logic for LSP and DAP but that logic only kicks in in the correct types and/or attributes is in place.
+
+### `[GenerateHandler([[[""], Name = ""], AllowDerivedRequests = true])]`
+Generates an interface based on the given request object, within the optional namespace if provided.
+You may also provide a specific name that will be used for the interface and base class names. The name format is `IHandler` and `HandlerBase`.
+
+There is special logic to handle request objects that use the `IPartialItemRequest<,>` or `IPartialItemsRequest<,>` interfaces. This emit another base class `PartialHandlerBase` that implements the right stuff for creating a handler that works with the partial spec.
+
+Certain MediatR request types will map to different matters.
+* `IRequest` - Will map as a request
+* `IRequest` - Will map as a notification
+* `IJsonRpcRequest` - Will map as a `Task` returning request.
+
+Example Request Object:
+```c#
+ [Parallel]
+ [Method(ClientNames.RegisterCapability, Direction.ServerToClient)]
+ [
+ GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Client", Name = "RegisterCapability"),
+ GenerateHandlerMethods,
+ GenerateRequestMethods(typeof(IClientLanguageServer), typeof(ILanguageServer))
+ ]
+ public class RegistrationParams : IJsonRpcRequest
+ {
+ public RegistrationContainer Registrations { get; set; } = null!;
+ }
+```
+
+Example Output
+```c#
+#nullable enable
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Client
+{
+ [Parallel, Method(ClientNames.RegisterCapability, Direction.ServerToClient)]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ public interface IRegisterCapabilityHandler : IJsonRpcRequestHandler
+ {
+ }
+
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute, System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
+ abstract public class RegisterCapabilityHandlerBase : AbstractHandlers.Request, IRegisterCapabilityHandler
+ {
+ }
+#nullable restore
+```
+Given `AllowDerivedRequests` an additional generic handler will be created.
+
+Example Request Object:
+```c#
+ [Parallel]
+ [Method(RequestNames.Launch, Direction.ClientToServer)]
+ [
+ GenerateHandler(Name = "Launch", AllowDerivedRequests = true),
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class LaunchRequestArguments : IRequest
+ {
+ ///
+ /// If noDebug is true the launch request should launch the program without enabling debugging.
+ ///
+ [Optional]
+ public bool NoDebug { get; set; }
+
+ ///
+ /// Optional data from the previous, restarted session.
+ /// The data is sent as the 'restart' attribute of the 'terminated' event.
+ /// The client should leave the data intact.
+ ///
+ [Optional]
+ [JsonProperty(PropertyName = "__restart")]
+ public JToken? Restart { get; set; }
+
+ [JsonExtensionData] public IDictionary ExtensionData { get; set; } = new Dictionary();
+ }
+
+ public class LaunchResponse
+ {
+ }
+```
+
+Example Output:
+```c#
+ [Parallel, Method(RequestNames.Launch, Direction.ClientToServer)]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ public interface ILaunchHandler : IJsonRpcRequestHandler where T : LaunchRequestArguments
+ {
+ }
+
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute, System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
+ abstract public class LaunchHandlerBase : AbstractHandlers.Request, ILaunchHandler where T : LaunchRequestArguments
+ {
+ }
+
+ public interface ILaunchHandler : ILaunchHandler
+ {
+ }
+
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute, System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
+ abstract public class LaunchHandlerBase : LaunchHandlerBase, ILaunchHandler
+ {
+ }
+```
+
+
+### `[GenerateHandlerMethods([params Type[] registryTypes])]`
+Generates helper methods for registering this as a delegate. This is useful in more functional scenarios and more importantly in unit testing scenarios.
+
+You can provide a list of registry types, these are the `this` item in a given extension method. If not provided it will attempt to infer the usage.
+
+Common registries are:
+* `IJsonRpcServerRegistry`
+* `ILanguageClientRegistry`
+* `ILanguageServerRegistry`
+* `IDebugAdapterClientRegistry`
+* `IDebugAdapterServerRegistry`
+
+Example request:
+
+```c#
+ [Parallel]
+ [Method(ClientNames.RegisterCapability, Direction.ServerToClient)]
+ [
+ GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Client", Name = "RegisterCapability"),
+ GenerateHandlerMethods
+ ]
+ public class RegistrationParams : IJsonRpcRequest
+ {
+ public RegistrationContainer Registrations { get; set; } = null!;
+ }
+```
+
+Example output:
+
+```c#
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Client
+{
+ [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute, System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ public static partial class RegisterCapabilityExtensions
+ {
+ public static ILanguageClientRegistry OnRegisterCapability(this ILanguageClientRegistry registry, Func handler) => registry.AddHandler(ClientNames.RegisterCapability, new DelegatingHandlers.Request(handler));
+ public static ILanguageClientRegistry OnRegisterCapability(this ILanguageClientRegistry registry, Func handler) => registry.AddHandler(ClientNames.RegisterCapability, new DelegatingHandlers.Request(handler));
+ }
+}
+```
+
+
+### `[GenerateRequestMethods([params Type[] proxyTypes])]`
+Generates helper methods for calling the notification or the delegate. This is useful for hinting to the user what methods there are to call on a given class.
+
+You can provide a list of proxy types, these are the `this` item in a given extension method. If not provided it will attempt to infer the usage.
+
+Common proxy types are anything that implements `IResponseRouter`:
+ * `ILanguageProtocolProxy`
+ * `ILanguageClientProxy`
+ * `IClientLanguageClient`
+ * `IGeneralLanguageClient`
+ * `ITextDocumentLanguageClient`
+ * `IWindowLanguageClient`
+ * `IWorkspaceLanguageClient`
+ * `ILanguageServerProxy`
+ * `IClientLanguageServer`
+ * `IGeneralLanguageServer`
+ * `ITextDocumentLanguageServer`
+ * `IWindowLanguageServer`
+ * `IWorkspaceLanguageServer`
+ * `IDebugAdapterProtocolProxy`
+ * `IDebugAdapterClientProxy`
+ * `IDebugAdapterServerProxy`
+
+Example request:
+
+```c#
+ [Parallel]
+ [Method(ClientNames.RegisterCapability, Direction.ServerToClient)]
+ [
+ GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Client", Name = "RegisterCapability"),
+ GenerateRequestMethods(typeof(IClientLanguageServer), typeof(ILanguageServer))
+ ]
+ public class RegistrationParams : IJsonRpcRequest
+ {
+ public RegistrationContainer Registrations { get; set; } = null!;
+ }
+```
+
+Example output:
+
+```c#
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Client
+{
+ [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute, System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ public static partial class RegisterCapabilityExtensions
+ {
+ public static Task RegisterCapability(this IClientLanguageServer mediator, RegistrationParams request, CancellationToken cancellationToken = default) => mediator.SendRequest(request, cancellationToken);
+ public static Task RegisterCapability(this ILanguageServer mediator, RegistrationParams request, CancellationToken cancellationToken = default) => mediator.SendRequest(request, cancellationToken);
+ }
+}
+```
+
+## LSP Generation Attributes
+
+### `CapabilityAttribute` / `RegistrationOptionsAttribute` / `ResolverAttribute`
+These attributes are used to generate the "correct" pieces. Some features do not have capabilities, some do not have registration, others both and some have none.
+
+* `CapabilityAttribute` - Defines the capability type to be used.
+* `RegistrationOptionsAttribute` - Defines the registration type to be used.
+* `ResolverAttribute` - Defines the type that this feature will use it's resolved item
+ * This is for the features that model around the resolve pattern, such as CodeLens or Completion.
+ * This only works with that specific pattern
+
+Example Request:
+```c#
+ namespace Models
+ {
+ [Parallel]
+ [Method(TextDocumentNames.References, Direction.ClientToServer)]
+ [
+ GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Document", Name = "References"),
+ GenerateHandlerMethods,
+ GenerateRequestMethods(typeof(ITextDocumentLanguageClient), typeof(ILanguageClient))
+ ]
+ [RegistrationOptions(typeof(ReferenceRegistrationOptions)), Capability(typeof(ReferenceCapability))]
+ public partial class ReferenceParams : TextDocumentPositionParams, IWorkDoneProgressParams, IPartialItemsRequest
+ {
+ public ReferenceContext Context { get; set; } = null!;
+ }
+ public class ReferenceContext
+ {
+ ///
+ /// Include the declaration of the current symbol.
+ ///
+ public bool IncludeDeclaration { get; set; }
+ }
+
+ [GenerateRegistrationOptions(nameof(ServerCapabilities.ReferencesProvider))]
+ public partial class ReferenceRegistrationOptions : ITextDocumentRegistrationOptions, IWorkDoneProgressOptions { }
+ }
+
+ namespace Client.Capabilities
+ {
+ [CapabilityKey(nameof(ClientCapabilities.TextDocument), nameof(TextDocumentClientCapabilities.References))]
+ public partial class ReferenceCapability : DynamicCapability, ConnectedCapability
+ {
+ }
+ }
+```
+
+Example Output:
+```c#
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Models
+{
+ public partial class ReferenceParams
+ {
+ [Optional]
+ public ProgressToken? WorkDoneToken
+ {
+ get;
+ set;
+ }
+
+ [Optional]
+ public ProgressToken? PartialResultToken
+ {
+ get;
+ set;
+ }
+ }
+}
+
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Document
+{
+ [Parallel, Method(TextDocumentNames.References, Direction.ClientToServer)]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ public partial interface IReferencesHandler : IJsonRpcRequestHandler, IRegistration
+ {
+ }
+
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute, System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
+ abstract public partial class ReferencesHandlerBase : AbstractHandlers.Request, IReferencesHandler
+ {
+ }
+
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute, System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
+ abstract public partial class ReferencesPartialHandlerBase : AbstractHandlers.PartialResults, IReferencesHandler
+ {
+ protected ReferencesPartialHandlerBase(System.Guid id, IProgressManager progressManager): base(progressManager, LocationContainer.From)
+ {
+ }
+ }
+
+ [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute, System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ public static partial class ReferencesExtensions
+ {
+ public static ILanguageServerRegistry OnReferences(this ILanguageServerRegistry registry, Func> handler, Func registrationOptions)
+ {
+ return registry.AddHandler(TextDocumentNames.References, new LanguageProtocolDelegatingHandlers.Request(HandlerAdapter.Adapt(handler), RegistrationAdapter.Adapt(registrationOptions)));
+ }
+
+ public static ILanguageServerRegistry OnReferences(this ILanguageServerRegistry registry, Func> handler, Func registrationOptions)
+ {
+ return registry.AddHandler(TextDocumentNames.References, new LanguageProtocolDelegatingHandlers.Request(HandlerAdapter.Adapt(handler), RegistrationAdapter.Adapt(registrationOptions)));
+ }
+
+ public static ILanguageServerRegistry OnReferences(this ILanguageServerRegistry registry, Func> handler, Func registrationOptions)
+ {
+ return registry.AddHandler(TextDocumentNames.References, new LanguageProtocolDelegatingHandlers.Request(HandlerAdapter.Adapt(handler), RegistrationAdapter.Adapt(registrationOptions)));
+ }
+
+ public static ILanguageServerRegistry ObserveReferences(this ILanguageServerRegistry registry, Action>> handler, Func registrationOptions)
+ {
+ return registry.AddHandler(TextDocumentNames.References, _ => new LanguageProtocolDelegatingHandlers.PartialResults(PartialAdapter.Adapt(handler), RegistrationAdapter.Adapt(registrationOptions), _.GetService(), LocationContainer.From));
+ }
+
+ public static ILanguageServerRegistry ObserveReferences(this ILanguageServerRegistry registry, Action>, CancellationToken> handler, Func registrationOptions)
+ {
+ return registry.AddHandler(TextDocumentNames.References, _ => new LanguageProtocolDelegatingHandlers.PartialResults(PartialAdapter.Adapt(handler), RegistrationAdapter.Adapt(registrationOptions), _.GetService(), LocationContainer.From));
+ }
+
+ public static ILanguageServerRegistry ObserveReferences(this ILanguageServerRegistry registry, Action>, ReferenceCapability, CancellationToken> handler, Func registrationOptions)
+ {
+ return registry.AddHandler(TextDocumentNames.References, _ => new LanguageProtocolDelegatingHandlers.PartialResults(PartialAdapter.Adapt(handler), RegistrationAdapter.Adapt(registrationOptions), _.GetService(), LocationContainer.From));
+ }
+
+ public static IRequestProgressObservable, LocationContainer> RequestReferences(this ITextDocumentLanguageClient mediator, ReferenceParams request, CancellationToken cancellationToken = default) => mediator.ProgressManager.MonitorUntil(request, value => new LocationContainer(value), cancellationToken);
+ public static IRequestProgressObservable, LocationContainer> RequestReferences(this ILanguageClient mediator, ReferenceParams request, CancellationToken cancellationToken = default) => mediator.ProgressManager.MonitorUntil(request, value => new LocationContainer(value), cancellationToken);
+ }
+}
+```
+
+### `GenerateTypedDataAttribute`
+
+This leverages two interfaces `ICanHaveData` and `ICanBeResolved` they are identical interfaces but just a slightly different in overall meaning.
+
+This attributes takes a class that implements that interface and creates a copy of the class with one generic type parameter.
+Then implements all the required logic to make that type work and interact with it's non-strongly typed friend. This includes methods and implict operators for conversion.
+
+Example Object:
+```c#
+ ///
+ /// A code lens represents a command that should be shown along with
+ /// source text, like the number of references, a way to run tests, etc.
+ ///
+ /// A code lens is _unresolved_ when no command is associated to it. For performance
+ /// reasons the creation of a code lens and resolving should be done in two stages.
+ ///
+ [DebuggerDisplay("{" + nameof(DebuggerDisplay) + ",nq}")]
+ [Parallel]
+ [Method(TextDocumentNames.CodeLensResolve, Direction.ClientToServer)]
+ [
+ GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Document", Name = "CodeLensResolve"),
+ GenerateHandlerMethods,
+ GenerateRequestMethods(typeof(ITextDocumentLanguageClient), typeof(ILanguageClient)),
+ GenerateTypedData,
+ GenerateContainer
+ ]
+ [RegistrationOptions(typeof(CodeLensRegistrationOptions)), Capability(typeof(CodeLensCapability))]
+ public partial class CodeLens : IRequest, ICanBeResolved
+ {
+ ///
+ /// The range in which this code lens is valid. Should only span a single line.
+ ///
+ public Range Range { get; set; } = null!;
+
+ ///
+ /// The command this code lens represents.
+ ///
+ [Optional]
+ public Command? Command { get; set; }
+
+ ///
+ /// A data entry field that is preserved on a code lens item between
+ /// a code lens and a code lens resolve request.
+ ///
+ [Optional]
+ public JToken? Data { get; set; }
+
+ private string DebuggerDisplay => $"{Range}{( Command != null ? $" {Command}" : "" )}";
+
+ ///
+ public override string ToString() => DebuggerDisplay;
+ }
+```
+
+Example Response:
+```c#
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Models
+{
+ public partial class CodeLens
+ {
+ public CodeLens WithData(TData data)
+ where TData : HandlerIdentity?
+ {
+ return new CodeLens{Range = Range, Command = Command, Data = data};
+ }
+
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("item")]
+ public static CodeLens? From(CodeLens? item)
+ where T : HandlerIdentity? => item switch
+ {
+ not null => item, _ => null
+ }
+
+ ;
+ }
+
+ ///
+ /// A code lens represents a command that should be shown along with
+ /// source text, like the number of references, a way to run tests, etc.
+ ///
+ /// A code lens is _unresolved_ when no command is associated to it. For performance
+ /// reasons the creation of a code lens and resolving should be done in two stages.
+ ///
+ [DebuggerDisplay("{" + nameof(DebuggerDisplay) + ",nq}")]
+ [Parallel]
+ [RegistrationOptions(typeof(CodeLensRegistrationOptions)), Capability(typeof(CodeLensCapability))]
+ [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute, System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ public partial class CodeLens : ICanBeResolved where T : HandlerIdentity?
+ {
+ ///
+ /// The range in which this code lens is valid. Should only span a single line.
+ ///
+ public Range Range
+ {
+ get;
+ set;
+ }
+
+ = null !;
+ ///
+ /// The command this code lens represents.
+ ///
+ [Optional]
+ public Command? Command
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// A data entry field that is preserved on a code lens item between
+ /// a code lens and a code lens resolve request.
+ ///
+ [Optional]
+ public T Data
+ {
+ get => ((ICanBeResolved)this).Data?.ToObject()!;
+ set => ((ICanBeResolved)this).Data = JToken.FromObject(value);
+ }
+
+ private string DebuggerDisplay => $"{Range}{(Command != null ? $" {Command}" : "")}";
+ ///
+ public override string ToString() => DebuggerDisplay;
+ public CodeLens WithData(TData data)
+ where TData : HandlerIdentity?
+ {
+ return new CodeLens{Range = Range, Command = Command, Data = data};
+ }
+
+ JToken? ICanBeResolved.Data
+ {
+ get;
+ set;
+ }
+
+ private JToken? JData
+ {
+ get => ((ICanBeResolved)this).Data;
+ set => ((ICanBeResolved)this).Data = value;
+ }
+
+ public static implicit operator CodeLens(CodeLens value) => new CodeLens{Range = value.Range, Command = value.Command, JData = ((ICanBeResolved)value).Data};
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("value")]
+ public static implicit operator CodeLens? (CodeLens? value) => value switch
+ {
+ not null => new CodeLens{Range = value.Range, Command = value.Command, Data = ((ICanBeResolved)value).Data}, _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("item")]
+ public static CodeLens? From(CodeLens? item) => item switch
+ {
+ not null => item, _ => null
+ }
+
+ ;
+ }
+
+ public partial class CodeLensContainer : ContainerBase> where T : HandlerIdentity?
+ {
+ public CodeLensContainer(): this(Enumerable.Empty>())
+ {
+ }
+
+ public CodeLensContainer(IEnumerable> items): base(items)
+ {
+ }
+
+ public CodeLensContainer(params CodeLens[] items): base(items)
+ {
+ }
+
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeLensContainer? From(IEnumerable>? items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeLensContainer? (CodeLens[] items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeLensContainer? From(params CodeLens[] items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeLensContainer? (Collection>? items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeLensContainer? From(Collection>? items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeLensContainer? (List>? items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeLensContainer? From(List>? items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeLensContainer? (in ImmutableArray>? items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeLensContainer? From(in ImmutableArray>? items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeLensContainer? (ImmutableList>? items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeLensContainer? From(ImmutableList>? items) => items switch
+ {
+ not null => new CodeLensContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("container")]
+ public static implicit operator CodeLensContainer? (CodeLensContainer? container) => container switch
+ {
+ not null => new CodeLensContainer(container.Select(value => (CodeLens)value)), _ => null
+ }
+
+ ;
+ }
+}
+```
+
+### `GenerateContainerAttribute`
+
+This is very simply it creates a class that derives from `ContainerBase` and implements conversion methods and operators.
+
+This leverages two interfaces `ICanHaveData` and `ICanBeResolved` they are identical interfaces but just a slightly different in overall meaning.
+
+This attributes takes a class that implements that interface and creates a copy of the class with one generic type parameter.
+Then implements all the required logic to make that type work and interact with it's non-strongly typed friend. This includes methods and implict operators for conversion.
+
+Example Object:
+```c#
+ ///
+ /// A code lens represents a command that should be shown along with
+ /// source text, like the number of references, a way to run tests, etc.
+ ///
+ /// A code lens is _unresolved_ when no command is associated to it. For performance
+ /// reasons the creation of a code lens and resolving should be done in two stages.
+ ///
+ [DebuggerDisplay("{" + nameof(DebuggerDisplay) + ",nq}")]
+ [Parallel]
+ [Method(TextDocumentNames.CodeLensResolve, Direction.ClientToServer)]
+ [
+ GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Document", Name = "CodeLensResolve"),
+ GenerateHandlerMethods,
+ GenerateRequestMethods(typeof(ITextDocumentLanguageClient), typeof(ILanguageClient)),
+ GenerateTypedData,
+ GenerateContainer
+ ]
+ [RegistrationOptions(typeof(CodeLensRegistrationOptions)), Capability(typeof(CodeLensCapability))]
+ public partial class CodeLens : IRequest, ICanBeResolved
+ {
+ ///
+ /// The range in which this code lens is valid. Should only span a single line.
+ ///
+ public Range Range { get; set; } = null!;
+
+ ///
+ /// The command this code lens represents.
+ ///
+ [Optional]
+ public Command? Command { get; set; }
+
+ ///
+ /// A data entry field that is preserved on a code lens item between
+ /// a code lens and a code lens resolve request.
+ ///
+ [Optional]
+ public JToken? Data { get; set; }
+
+ private string DebuggerDisplay => $"{Range}{( Command != null ? $" {Command}" : "" )}";
+
+ ///
+ public override string ToString() => DebuggerDisplay;
+ }
+```
+
+Example Response:
+```c#
+namespace OmniSharp.Extensions.LanguageServer.Protocol.Models
+{
+ [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute, System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ public partial class CodeActionContainer : ContainerBase
+ {
+ public CodeActionContainer(): this(Enumerable.Empty())
+ {
+ }
+
+ public CodeActionContainer(IEnumerable items): base(items)
+ {
+ }
+
+ public CodeActionContainer(params CodeAction[] items): base(items)
+ {
+ }
+
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeActionContainer? From(IEnumerable? items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeActionContainer? (CodeAction[] items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeActionContainer? From(params CodeAction[] items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeActionContainer? (Collection? items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeActionContainer? From(Collection? items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeActionContainer? (List? items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeActionContainer? From(List? items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeActionContainer? (in ImmutableArray? items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeActionContainer? From(in ImmutableArray? items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static implicit operator CodeActionContainer? (ImmutableList? items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("items")]
+ public static CodeActionContainer? From(ImmutableList? items) => items switch
+ {
+ not null => new CodeActionContainer(items), _ => null
+ }
+
+ ;
+ }
+}
+```
+
+### `GenerateRegistrationOptionsAttribute`
+This attribute is used to the static version of the registration options and generate a default converter if none is provided.
+
+Example Options
+```c#
+ [GenerateRegistrationOptions(nameof(ServerCapabilities.ImplementationProvider))]
+ public partial class ImplementationRegistrationOptions : ITextDocumentRegistrationOptions, IWorkDoneProgressOptions, IStaticRegistrationOptions { }
+```
+
+Example Output:
+```c#
+ [RegistrationOptionsConverterAttribute(typeof(ImplementationRegistrationOptionsConverter))]
+ public partial class ImplementationRegistrationOptions : OmniSharp.Extensions.LanguageServer.Protocol.IRegistrationOptions
+ {
+ public DocumentSelector? DocumentSelector
+ {
+ get;
+ set;
+ }
+
+ [Optional]
+ public bool WorkDoneProgress
+ {
+ get;
+ set;
+ }
+
+ [Optional]
+ public string? Id
+ {
+ get;
+ set;
+ }
+
+ class ImplementationRegistrationOptionsConverter : RegistrationOptionsConverterBase
+ {
+ public ImplementationRegistrationOptionsConverter(): base(nameof(ServerCapabilities.ImplementationProvider))
+ {
+ }
+
+ public override StaticOptions Convert(ImplementationRegistrationOptions source)
+ {
+ return new StaticOptions{WorkDoneProgress = source.WorkDoneProgress, Id = source.Id};
+ }
+ }
+
+ public partial class StaticOptions : IWorkDoneProgressOptions, IStaticRegistrationOptions
+ {
+ [Optional]
+ public bool WorkDoneProgress
+ {
+ get;
+ set;
+ }
+
+ [Optional]
+ public string? Id
+ {
+ get;
+ set;
+ }
+ }
+ }
+```
diff --git a/sample/SampleServer/DidChangeWatchedFilesHandler.cs b/sample/SampleServer/DidChangeWatchedFilesHandler.cs
index 320569019..eca65e2d8 100644
--- a/sample/SampleServer/DidChangeWatchedFilesHandler.cs
+++ b/sample/SampleServer/DidChangeWatchedFilesHandler.cs
@@ -13,8 +13,6 @@ internal class DidChangeWatchedFilesHandler : IDidChangeWatchedFilesHandler
public Task Handle(DidChangeWatchedFilesParams request, CancellationToken cancellationToken) => Unit.Task;
- public void SetCapability(DidChangeWatchedFilesCapability capability)
- {
- }
+ public DidChangeWatchedFilesRegistrationOptions GetRegistrationOptions(DidChangeWatchedFilesCapability capability, ClientCapabilities clientCapabilities) => new DidChangeWatchedFilesRegistrationOptions();
}
}
diff --git a/sample/SampleServer/FoldingRangeHandler.cs b/sample/SampleServer/FoldingRangeHandler.cs
index 94423c29c..81d3f1362 100644
--- a/sample/SampleServer/FoldingRangeHandler.cs
+++ b/sample/SampleServer/FoldingRangeHandler.cs
@@ -29,8 +29,8 @@ CancellationToken cancellationToken
)
);
- public void SetCapability(FoldingRangeCapability capability)
- {
- }
+ public FoldingRangeRegistrationOptions GetRegistrationOptions(FoldingRangeCapability capability, ClientCapabilities clientCapabilities) => new FoldingRangeRegistrationOptions {
+ DocumentSelector = DocumentSelector.ForLanguage("csharp")
+ };
}
}
diff --git a/sample/SampleServer/SemanticTokensHandler.cs b/sample/SampleServer/SemanticTokensHandler.cs
index 0bbe5a848..01c54f241 100644
--- a/sample/SampleServer/SemanticTokensHandler.cs
+++ b/sample/SampleServer/SemanticTokensHandler.cs
@@ -18,16 +18,7 @@ public class SemanticTokensHandler : SemanticTokensHandlerBase
{
private readonly ILogger _logger;
- public SemanticTokensHandler(ILogger logger) : base(
- new SemanticTokensRegistrationOptions {
- DocumentSelector = DocumentSelector.ForLanguage("csharp"),
- Legend = new SemanticTokensLegend(),
- Full = new SemanticTokensCapabilityRequestFull {
- Delta = true
- },
- Range = true
- }
- ) =>
+ public SemanticTokensHandler(ILogger logger) =>
_logger = logger;
public override async Task Handle(
@@ -83,7 +74,7 @@ CancellationToken cancellationToken
protected override Task
GetSemanticTokensDocument(ITextDocumentIdentifierParams @params, CancellationToken cancellationToken) =>
- Task.FromResult(new SemanticTokensDocument(GetRegistrationOptions().Legend));
+ Task.FromResult(new SemanticTokensDocument(RegistrationOptions.Legend));
private IEnumerable RotateEnum(IEnumerable values)
@@ -94,6 +85,18 @@ private IEnumerable RotateEnum(IEnumerable values)
yield return item;
}
}
+
+ protected override SemanticTokensRegistrationOptions CreateRegistrationOptions(SemanticTokensCapability capability, ClientCapabilities clientCapabilities) => new SemanticTokensRegistrationOptions {
+ DocumentSelector = DocumentSelector.ForLanguage("csharp"),
+ Legend = new SemanticTokensLegend() {
+ TokenModifiers = capability.TokenModifiers,
+ TokenTypes = capability.TokenTypes
+ },
+ Full = new SemanticTokensCapabilityRequestFull {
+ Delta = true
+ },
+ Range = true
+ };
}
#pragma warning restore 618
}
diff --git a/sample/SampleServer/TextDocumentHandler.cs b/sample/SampleServer/TextDocumentHandler.cs
index 937771370..94145e067 100644
--- a/sample/SampleServer/TextDocumentHandler.cs
+++ b/sample/SampleServer/TextDocumentHandler.cs
@@ -13,11 +13,12 @@
using OmniSharp.Extensions.LanguageServer.Protocol.Server.Capabilities;
using OmniSharp.Extensions.LanguageServer.Protocol.Server.WorkDone;
using OmniSharp.Extensions.LanguageServer.Protocol.Workspace;
+
#pragma warning disable CS0618
namespace SampleServer
{
- internal class TextDocumentHandler : ITextDocumentSyncHandler
+ internal class TextDocumentHandler : TextDocumentSyncHandlerBase
{
private readonly ILogger _logger;
private readonly ILanguageServerConfiguration _configuration;
@@ -28,12 +29,7 @@ internal class TextDocumentHandler : ITextDocumentSyncHandler
}
);
- private SynchronizationCapability _capability;
-
- public TextDocumentHandler(
- ILogger logger, Foo foo,
- ILanguageServerConfiguration configuration
- )
+ public TextDocumentHandler(ILogger logger, Foo foo, ILanguageServerConfiguration configuration)
{
_logger = logger;
_configuration = configuration;
@@ -42,7 +38,7 @@ ILanguageServerConfiguration configuration
public TextDocumentSyncKind Change { get; } = TextDocumentSyncKind.Full;
- public Task Handle(DidChangeTextDocumentParams notification, CancellationToken token)
+ public override Task Handle(DidChangeTextDocumentParams notification, CancellationToken token)
{
_logger.LogCritical("Critical");
_logger.LogDebug("Debug");
@@ -51,16 +47,7 @@ public Task Handle(DidChangeTextDocumentParams notification, CancellationT
return Unit.Task;
}
- TextDocumentChangeRegistrationOptions IRegistration.
- GetRegistrationOptions() =>
- new TextDocumentChangeRegistrationOptions {
- DocumentSelector = _documentSelector,
- SyncKind = Change
- };
-
- public void SetCapability(SynchronizationCapability capability) => _capability = capability;
-
- public async Task Handle(DidOpenTextDocumentParams notification, CancellationToken token)
+ public override async Task Handle(DidOpenTextDocumentParams notification, CancellationToken token)
{
await Task.Yield();
_logger.LogInformation("Hello world!");
@@ -68,12 +55,7 @@ public async Task Handle(DidOpenTextDocumentParams notification, Cancellat
return Unit.Value;
}
- TextDocumentRegistrationOptions IRegistration.GetRegistrationOptions() =>
- new TextDocumentRegistrationOptions {
- DocumentSelector = _documentSelector,
- };
-
- public Task Handle(DidCloseTextDocumentParams notification, CancellationToken token)
+ public override Task Handle(DidCloseTextDocumentParams notification, CancellationToken token)
{
if (_configuration.TryGetScopedConfiguration(notification.TextDocument.Uri, out var disposable))
{
@@ -83,28 +65,20 @@ public Task Handle(DidCloseTextDocumentParams notification, CancellationTo
return Unit.Task;
}
- public Task Handle(DidSaveTextDocumentParams notification, CancellationToken token) => Unit.Task;
+ public override Task Handle(DidSaveTextDocumentParams notification, CancellationToken token) => Unit.Task;
- TextDocumentSaveRegistrationOptions IRegistration.GetRegistrationOptions() =>
- new TextDocumentSaveRegistrationOptions {
- DocumentSelector = _documentSelector,
- IncludeText = true
- };
+ protected override TextDocumentSyncRegistrationOptions CreateRegistrationOptions(SynchronizationCapability capability, ClientCapabilities clientCapabilities) => new TextDocumentSyncRegistrationOptions() {
+ DocumentSelector = _documentSelector,
+ SyncKind = Change,
+ IncludeText = true
+ };
- public TextDocumentAttributes GetTextDocumentAttributes(DocumentUri uri) => new TextDocumentAttributes(uri, "csharp");
+ public override TextDocumentAttributes GetTextDocumentAttributes(DocumentUri uri) => new TextDocumentAttributes(uri, "csharp");
}
- internal class MyDocumentSymbolHandler : DocumentSymbolHandler
+ internal class MyDocumentSymbolHandler : IDocumentSymbolHandler
{
- public MyDocumentSymbolHandler() : base(
- new DocumentSymbolRegistrationOptions {
- DocumentSelector = DocumentSelector.ForLanguage("csharp")
- }
- )
- {
- }
-
- public override async Task Handle(
+ public async Task Handle(
DocumentSymbolParams request,
CancellationToken cancellationToken
)
@@ -151,23 +125,26 @@ CancellationToken cancellationToken
// await Task.Delay(2000, cancellationToken);
return symbols;
}
+
+ public DocumentSymbolRegistrationOptions GetRegistrationOptions(DocumentSymbolCapability capability, ClientCapabilities clientCapabilities) => new DocumentSymbolRegistrationOptions {
+ DocumentSelector = DocumentSelector.ForLanguage("csharp")
+ };
}
- internal class MyWorkspaceSymbolsHandler : WorkspaceSymbolsHandler
+ internal class MyWorkspaceSymbolsHandler : IWorkspaceSymbolsHandler
{
private readonly IServerWorkDoneManager _serverWorkDoneManager;
private readonly IProgressManager _progressManager;
private readonly ILogger _logger;
- public MyWorkspaceSymbolsHandler(IServerWorkDoneManager serverWorkDoneManager, IProgressManager progressManager, ILogger logger) :
- base(new WorkspaceSymbolRegistrationOptions())
+ public MyWorkspaceSymbolsHandler(IServerWorkDoneManager serverWorkDoneManager, IProgressManager progressManager, ILogger logger)
{
_serverWorkDoneManager = serverWorkDoneManager;
_progressManager = progressManager;
_logger = logger;
}
- public override async Task> Handle(
+ public async Task> Handle(
WorkspaceSymbolParams request,
CancellationToken cancellationToken
)
@@ -272,5 +249,7 @@ CancellationToken cancellationToken
);
}
}
+
+ public WorkspaceSymbolRegistrationOptions GetRegistrationOptions(WorkspaceSymbolCapability capability, ClientCapabilities clientCapabilities) => new WorkspaceSymbolRegistrationOptions();
}
}
diff --git a/src/Client/LanguageClient.cs b/src/Client/LanguageClient.cs
index 1c7d12043..e59c5f956 100644
--- a/src/Client/LanguageClient.cs
+++ b/src/Client/LanguageClient.cs
@@ -28,6 +28,7 @@
namespace OmniSharp.Extensions.LanguageServer.Client
{
+ [BuiltIn]
public class LanguageClient : JsonRpcServerBase, ILanguageClient
{
private readonly Connection _connection;
@@ -35,7 +36,7 @@ public class LanguageClient : JsonRpcServerBase, ILanguageClient
private readonly ILspClientReceiver _receiver;
private readonly TextDocumentIdentifiers _textDocumentIdentifiers;
- private readonly IHandlerCollection _collection;
+ private readonly SharedHandlerCollection _collection;
// private readonly IEnumerable _initializeDelegates;
// private readonly IEnumerable _initializedDelegates;
@@ -143,8 +144,10 @@ internal LanguageClient(
IProgressManager progressManager,
IClientWorkDoneManager clientWorkDoneManager,
IRegistrationManager registrationManager,
- ILanguageClientWorkspaceFoldersManager languageClientWorkspaceFoldersManager, IEnumerable initializeDelegates,
- IEnumerable initializeHandlers, IEnumerable initializedDelegates,
+ ILanguageClientWorkspaceFoldersManager languageClientWorkspaceFoldersManager,
+ IEnumerable initializeDelegates,
+ IEnumerable initializeHandlers,
+ IEnumerable initializedDelegates,
IEnumerable initializedHandlers,
LspSerializer serializer,
InstanceHasStarted instanceHasStarted
@@ -250,12 +253,9 @@ public async Task Initialize(CancellationToken token)
_serializer.JsonSerializer.Populate(reader, _clientCapabilities);
}
+ _collection.Initialize();
RegisterCapabilities(_clientCapabilities);
- WorkDoneManager.Initialize(@params.Capabilities.Window);
-
- ClientSettings = @params;
-
await LanguageProtocolEventingHelper.Run(
_initializeDelegates,
(handler, ct) => handler(this, @params, ct),
@@ -265,6 +265,10 @@ await LanguageProtocolEventingHelper.Run(
token
).ConfigureAwait(false);
+ WorkDoneManager.Initialize(@params.Capabilities.Window);
+
+ ClientSettings = @params;
+
_connection.Open();
var serverParams = await SendRequest(ClientSettings, token).ConfigureAwait(false);
diff --git a/src/Client/LanguageClientRegistrationManager.cs b/src/Client/LanguageClientRegistrationManager.cs
index 1ef32e538..893025dea 100644
--- a/src/Client/LanguageClientRegistrationManager.cs
+++ b/src/Client/LanguageClientRegistrationManager.cs
@@ -19,13 +19,14 @@
namespace OmniSharp.Extensions.LanguageServer.Client
{
+ [BuiltIn]
internal class LanguageClientRegistrationManager : IRegisterCapabilityHandler, IUnregisterCapabilityHandler, IRegistrationManager, IDisposable
{
private readonly ISerializer _serializer;
private readonly ILspHandlerTypeDescriptorProvider _handlerTypeDescriptorProvider;
private readonly ILogger _logger;
private readonly ConcurrentDictionary _registrations;
- private ReplaySubject> _registrationSubject = new ReplaySubject>(1);
+ private readonly ReplaySubject> _registrationSubject = new ReplaySubject>(1);
public LanguageClientRegistrationManager(
ISerializer serializer,
diff --git a/src/Client/LanguageClientWorkspaceFoldersManager.cs b/src/Client/LanguageClientWorkspaceFoldersManager.cs
index 050d6514d..c768335bc 100644
--- a/src/Client/LanguageClientWorkspaceFoldersManager.cs
+++ b/src/Client/LanguageClientWorkspaceFoldersManager.cs
@@ -14,6 +14,7 @@
namespace OmniSharp.Extensions.LanguageServer.Client
{
+ [BuiltIn]
internal class LanguageClientWorkspaceFoldersManager : ILanguageClientWorkspaceFoldersManager, IDisposable
{
private readonly IWorkspaceLanguageClient _client;
diff --git a/src/Dap.Protocol/AbstractHandlers.cs b/src/Dap.Protocol/AbstractHandlers.cs
new file mode 100644
index 000000000..ab80046e9
--- /dev/null
+++ b/src/Dap.Protocol/AbstractHandlers.cs
@@ -0,0 +1,23 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ public static class AbstractHandlers
+ {
+ public abstract class Request :
+ IJsonRpcRequestHandler
+ where TParams : IRequest
+ {
+ public abstract Task Handle(TParams request, CancellationToken cancellationToken);
+ }
+
+ public abstract class Notification : IJsonRpcRequestHandler
+ where TParams : IRequest
+ {
+ public abstract Task Handle(TParams request, CancellationToken cancellationToken);
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Dap.Protocol.csproj b/src/Dap.Protocol/Dap.Protocol.csproj
index 40417c6b1..71f2b0ec2 100644
--- a/src/Dap.Protocol/Dap.Protocol.csproj
+++ b/src/Dap.Protocol/Dap.Protocol.csproj
@@ -27,24 +27,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MSBuild:GenerateCodeFromAttributes
diff --git a/src/Dap.Protocol/DapReceiver.cs b/src/Dap.Protocol/DapReceiver.cs
index 48c3a6d49..2d580b920 100644
--- a/src/Dap.Protocol/DapReceiver.cs
+++ b/src/Dap.Protocol/DapReceiver.cs
@@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reactive.Linq;
+using System.Reactive.Subjects;
+using System.Reactive.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Linq;
using OmniSharp.Extensions.DebugAdapter.Protocol.Events;
diff --git a/src/Dap.Protocol/Events/BreakpointEvent.cs b/src/Dap.Protocol/Events/BreakpointEvent.cs
deleted file mode 100644
index f13a5d974..000000000
--- a/src/Dap.Protocol/Events/BreakpointEvent.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Breakpoint, Direction.ServerToClient)]
- public class BreakpointEvent : IRequest
- {
- ///
- /// The reason for the event.
- /// Values: 'changed', 'new', 'removed', etc.
- ///
- public string Reason { get; set; } = null!;
-
- ///
- /// The 'id' attribute is used to find the target breakpoint and the other attributes are used as the new values.
- ///
- public Breakpoint Breakpoint { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Events/BreakpointExtensions.cs b/src/Dap.Protocol/Events/BreakpointExtensions.cs
deleted file mode 100644
index 3f19f24d6..000000000
--- a/src/Dap.Protocol/Events/BreakpointExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Breakpoint, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IBreakpointHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class BreakpointHandler : IBreakpointHandler
- {
- public abstract Task Handle(BreakpointEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/CapabilitiesEvent.cs b/src/Dap.Protocol/Events/CapabilitiesEvent.cs
deleted file mode 100644
index 735d6ec48..000000000
--- a/src/Dap.Protocol/Events/CapabilitiesEvent.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Capabilities, Direction.ServerToClient)]
- public class CapabilitiesEvent : IRequest
- {
- ///
- /// The set of updated capabilities.
- ///
- public Capabilities Capabilities { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Events/CapabilitiesExtensions.cs b/src/Dap.Protocol/Events/CapabilitiesExtensions.cs
deleted file mode 100644
index 3a4a3b5d0..000000000
--- a/src/Dap.Protocol/Events/CapabilitiesExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Capabilities, Direction.ServerToClient)]
- [GenerateRequestMethods]
- [GenerateHandlerMethods]
- public interface ICapabilitiesHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class CapabilitiesHandler : ICapabilitiesHandler
- {
- public abstract Task Handle(CapabilitiesEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/ContinuedEvent.cs b/src/Dap.Protocol/Events/ContinuedEvent.cs
deleted file mode 100644
index 23ff44751..000000000
--- a/src/Dap.Protocol/Events/ContinuedEvent.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Continued, Direction.ServerToClient)]
- public class ContinuedEvent : IRequest
- {
- ///
- /// The thread which was continued.
- ///
- public long ThreadId { get; set; }
-
- ///
- /// If 'allThreadsContinued' is true, a debug adapter can announce that all threads have continued.
- ///
- [Optional]
- public bool AllThreadsContinued { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/ContinuedExtensions.cs b/src/Dap.Protocol/Events/ContinuedExtensions.cs
deleted file mode 100644
index 80016a4a7..000000000
--- a/src/Dap.Protocol/Events/ContinuedExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Continued, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IContinuedHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class ContinuedHandler : IContinuedHandler
- {
- public abstract Task Handle(ContinuedEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/ExitedEvent.cs b/src/Dap.Protocol/Events/ExitedEvent.cs
deleted file mode 100644
index 76c7e8278..000000000
--- a/src/Dap.Protocol/Events/ExitedEvent.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Exited, Direction.ServerToClient)]
- public class ExitedEvent : IRequest
- {
- ///
- /// The exit code returned from the debuggee.
- ///
- public long ExitCode { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/ExitedExtensions.cs b/src/Dap.Protocol/Events/ExitedExtensions.cs
deleted file mode 100644
index 8a1f43481..000000000
--- a/src/Dap.Protocol/Events/ExitedExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Exited, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IExitedHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class ExitedHandler : IExitedHandler
- {
- public abstract Task Handle(ExitedEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/IProgressEndHandler.cs b/src/Dap.Protocol/Events/IProgressEndHandler.cs
deleted file mode 100644
index a63e4fc2f..000000000
--- a/src/Dap.Protocol/Events/IProgressEndHandler.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.ProgressEnd, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IProgressEndHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class ProgressEndHandlerBase : IProgressEndHandler
- {
- public abstract Task Handle(ProgressEndEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/IProgressStartHandler.cs b/src/Dap.Protocol/Events/IProgressStartHandler.cs
deleted file mode 100644
index 29143b6dd..000000000
--- a/src/Dap.Protocol/Events/IProgressStartHandler.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.ProgressStart, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IProgressStartHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class ProgressStartHandlerBase : IProgressStartHandler
- {
- public abstract Task Handle(ProgressStartEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/IProgressUpdateHandler.cs b/src/Dap.Protocol/Events/IProgressUpdateHandler.cs
deleted file mode 100644
index 1776fde5f..000000000
--- a/src/Dap.Protocol/Events/IProgressUpdateHandler.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.ProgressUpdate, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IProgressUpdateHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class ProgressUpdateHandlerBase : IProgressUpdateHandler
- {
- public abstract Task Handle(ProgressUpdateEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/InitializedEvent.cs b/src/Dap.Protocol/Events/InitializedEvent.cs
deleted file mode 100644
index 818b69e49..000000000
--- a/src/Dap.Protocol/Events/InitializedEvent.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Initialized, Direction.ServerToClient)]
- public class InitializedEvent : IRequest
- {
- }
-}
diff --git a/src/Dap.Protocol/Events/InitializedExtensions.cs b/src/Dap.Protocol/Events/InitializedExtensions.cs
deleted file mode 100644
index 0b0eceff0..000000000
--- a/src/Dap.Protocol/Events/InitializedExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Initialized, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IDebugAdapterInitializedHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class DebugAdapterInitializedHandler : IDebugAdapterInitializedHandler
- {
- public abstract Task Handle(InitializedEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/LoadedSourceEvent.cs b/src/Dap.Protocol/Events/LoadedSourceEvent.cs
deleted file mode 100644
index a8b1fc27e..000000000
--- a/src/Dap.Protocol/Events/LoadedSourceEvent.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.LoadedSource, Direction.ServerToClient)]
- public class LoadedSourceEvent : IRequest
- {
- ///
- /// The reason for the event.
- ///
- public LoadedSourceReason Reason { get; set; }
-
- ///
- /// The new, changed, or removed source.
- ///
- public Source Source { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Events/LoadedSourceExtensions.cs b/src/Dap.Protocol/Events/LoadedSourceExtensions.cs
deleted file mode 100644
index 1d539ff3a..000000000
--- a/src/Dap.Protocol/Events/LoadedSourceExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.LoadedSource, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ILoadedSourceHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class LoadedSourceHandler : ILoadedSourceHandler
- {
- public abstract Task Handle(LoadedSourceEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/LoadedSourceReason.cs b/src/Dap.Protocol/Events/LoadedSourceReason.cs
deleted file mode 100644
index e0eafb3a9..000000000
--- a/src/Dap.Protocol/Events/LoadedSourceReason.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [JsonConverter(typeof(StringEnumConverter))]
- public enum LoadedSourceReason
- {
- New, Changed, Removed
- }
-}
diff --git a/src/Dap.Protocol/Events/ModuleEvent.cs b/src/Dap.Protocol/Events/ModuleEvent.cs
deleted file mode 100644
index cda325036..000000000
--- a/src/Dap.Protocol/Events/ModuleEvent.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Module, Direction.ServerToClient)]
- public class ModuleEvent : IRequest
- {
- ///
- /// The reason for the event.
- ///
- public ModuleEventReason Reason { get; set; }
-
- ///
- /// The new, changed, or removed module. In case of 'removed' only the module id is used.
- ///
- public Module Module { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Events/ModuleEventReason.cs b/src/Dap.Protocol/Events/ModuleEventReason.cs
deleted file mode 100644
index 89c5cbbbc..000000000
--- a/src/Dap.Protocol/Events/ModuleEventReason.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [JsonConverter(typeof(StringEnumConverter))]
- public enum ModuleEventReason
- {
- New, Changed, Removed
- }
-}
diff --git a/src/Dap.Protocol/Events/ModuleExtensions.cs b/src/Dap.Protocol/Events/ModuleExtensions.cs
deleted file mode 100644
index c4dd61dee..000000000
--- a/src/Dap.Protocol/Events/ModuleExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Module, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IModuleHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class ModuleHandler : IModuleHandler
- {
- public abstract Task Handle(ModuleEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/OutputEvent.cs b/src/Dap.Protocol/Events/OutputEvent.cs
deleted file mode 100644
index 511e7cfb5..000000000
--- a/src/Dap.Protocol/Events/OutputEvent.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using MediatR;
-using Newtonsoft.Json.Linq;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Output, Direction.ServerToClient)]
- public class OutputEvent : IRequest
- {
- ///
- /// The output category. If not specified, 'console' is assumed.
- /// Values: 'console', 'stdout', 'stderr', 'telemetry', etc.
- ///
- [Optional]
- public string? Category { get; set; }
-
- ///
- /// The output to report.
- ///
- public string Output { get; set; } = null!;
-
- ///
- /// If an attribute 'variablesReference' exists and its value is > 0, the output contains objects which can be retrieved by passing 'variablesReference' to the 'variables' request.
- ///
- [Optional]
- public long? VariablesReference { get; set; }
-
- ///
- /// An optional source location where the output was produced.
- ///
- [Optional]
- public Source? Source { get; set; }
-
- ///
- /// An optional source location line where the output was produced.
- ///
- [Optional]
- public long? Line { get; set; }
-
- ///
- /// An optional source location column where the output was produced.
- ///
- [Optional]
- public long? Column { get; set; }
-
- ///
- /// Optional data to report. For the 'telemetry' category the data will be sent to telemetry, for the other categories the data is shown in JSON format.
- ///
- [Optional]
- public JToken? Data { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/OutputExtensions.cs b/src/Dap.Protocol/Events/OutputExtensions.cs
deleted file mode 100644
index 355965f92..000000000
--- a/src/Dap.Protocol/Events/OutputExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Output, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IOutputHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class OutputHandler : IOutputHandler
- {
- public abstract Task Handle(OutputEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/ProcessEvent.cs b/src/Dap.Protocol/Events/ProcessEvent.cs
deleted file mode 100644
index fa99cee52..000000000
--- a/src/Dap.Protocol/Events/ProcessEvent.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Process, Direction.ServerToClient)]
- public class ProcessEvent : IRequest
- {
- ///
- /// The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js.
- ///
- public string Name { get; set; } = null!;
-
- ///
- /// The system process id of the debugged process. This property will be missing for non-system processes.
- ///
- [Optional]
- public long? SystemProcessId { get; set; }
-
- ///
- /// If true, the process is running on the same computer as the debug adapter.
- ///
- [Optional]
- public bool IsLocalProcess { get; set; }
-
- ///
- /// Describes how the debug engine started debugging this process.
- /// 'launch': Process was launched under the debugger.
- /// 'attach': Debugger attached to an existing process.
- /// 'attachForSuspendedLaunch': A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.
- ///
- [Optional]
- public ProcessEventStartMethod? StartMethod { get; set; }
-
- ///
- /// The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display.
- ///
- [Optional]
- public long? PointerSize { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/ProcessEventStartMethod.cs b/src/Dap.Protocol/Events/ProcessEventStartMethod.cs
deleted file mode 100644
index c9685ea71..000000000
--- a/src/Dap.Protocol/Events/ProcessEventStartMethod.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [JsonConverter(typeof(StringEnumConverter))]
- public enum ProcessEventStartMethod
- {
- Launch, Attach, AttachForSuspendedLaunch
- }
-}
diff --git a/src/Dap.Protocol/Events/ProcessExtensions.cs b/src/Dap.Protocol/Events/ProcessExtensions.cs
deleted file mode 100644
index 482901dc4..000000000
--- a/src/Dap.Protocol/Events/ProcessExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Process, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IProcessHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class ProcessHandler : IProcessHandler
- {
- public abstract Task Handle(ProcessEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/ProgressEndEvent.cs b/src/Dap.Protocol/Events/ProgressEndEvent.cs
deleted file mode 100644
index 73202a906..000000000
--- a/src/Dap.Protocol/Events/ProgressEndEvent.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.ProgressEnd, Direction.ServerToClient)]
- public class ProgressEndEvent : ProgressEvent, IRequest
- {
- }
-}
diff --git a/src/Dap.Protocol/Events/ProgressEvent.cs b/src/Dap.Protocol/Events/ProgressEvent.cs
deleted file mode 100644
index 8ef568601..000000000
--- a/src/Dap.Protocol/Events/ProgressEvent.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- public abstract class ProgressEvent
- {
- ///
- /// The ID that was introduced in the initial 'progressStart' event.
- ///
- public ProgressToken ProgressId { get; set; }
-
- ///
- /// Optional, more detailed progress message. If omitted, the previous message (if any) is used.
- ///
- [Optional]
- public string? Message { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/ProgressStartEvent.cs b/src/Dap.Protocol/Events/ProgressStartEvent.cs
deleted file mode 100644
index b1b21a54e..000000000
--- a/src/Dap.Protocol/Events/ProgressStartEvent.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.ProgressStart, Direction.ServerToClient)]
- public class ProgressStartEvent : ProgressEvent, IRequest
- {
- ///
- /// Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation.
- ///
- public string Title { get; set; } = null!;
-
- ///
- /// The request ID that this progress report is related to. If specified a debug adapter is expected to emit
- /// progress events for the long running request until the request has been either completed or cancelled.
- /// If the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.
- ///
- [Optional]
- public int? RequestId { get; set; }
-
- ///
- /// If true, the request that reports progress may be canceled with a 'cancel' request.
- /// So this property basically controls whether the client should use UX that supports cancellation.
- /// Clients that don't support cancellation are allowed to ignore the setting.
- ///
- [Optional]
- public bool Cancellable { get; set; }
-
- ///
- /// Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown.
- ///
- [Optional]
- public int? Percentage { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/ProgressUpdateEvent.cs b/src/Dap.Protocol/Events/ProgressUpdateEvent.cs
deleted file mode 100644
index 3bac1eee8..000000000
--- a/src/Dap.Protocol/Events/ProgressUpdateEvent.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.ProgressUpdate, Direction.ServerToClient)]
- public class ProgressUpdateEvent : ProgressEvent, IRequest
- {
- ///
- /// Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown.
- ///
- [Optional]
- public double? Percentage { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/StoppedEvent.cs b/src/Dap.Protocol/Events/StoppedEvent.cs
deleted file mode 100644
index c10dbd5f2..000000000
--- a/src/Dap.Protocol/Events/StoppedEvent.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Stopped, Direction.ServerToClient)]
- public class StoppedEvent : IRequest
- {
- ///
- /// The reason for the event.
- /// For backward compatibility this string is shown in the UI if the 'description' attribute is missing (but it must not be translated).
- /// Values: 'step', 'breakpoint', 'exception', 'pause', 'entry', 'goto', 'function breakpoint', 'data breakpoint', etc.
- ///
- public string Reason { get; set; } = null!;
-
- ///
- /// The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and must be translated.
- ///
- [Optional]
- public string? Description { get; set; }
-
- ///
- /// The thread which was stopped.
- ///
- [Optional]
- public long? ThreadId { get; set; }
-
- ///
- /// A value of true hints to the frontend that this event should not change the focus.
- ///
- [Optional]
- public bool PreserveFocusHint { get; set; }
-
- ///
- /// Additional information. E.g. if reason is 'exception', text contains the exception name. This string is shown in the UI.
- ///
- [Optional]
- public string? Text { get; set; }
-
- ///
- /// If 'allThreadsStopped' is true, a debug adapter can announce that all threads have stopped.
- /// - The client should use this information to enable that all threads can be expanded to access their stacktraces.
- /// - If the attribute is missing or false, only the thread with the given threadId can be expanded.
- ///
- [Optional]
- public bool AllThreadsStopped { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/StoppedExtensions.cs b/src/Dap.Protocol/Events/StoppedExtensions.cs
deleted file mode 100644
index 565491a86..000000000
--- a/src/Dap.Protocol/Events/StoppedExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Stopped, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IStoppedHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class StoppedHandler : IStoppedHandler
- {
- public abstract Task Handle(StoppedEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/TerminatedEvent.cs b/src/Dap.Protocol/Events/TerminatedEvent.cs
deleted file mode 100644
index fdb792d20..000000000
--- a/src/Dap.Protocol/Events/TerminatedEvent.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using MediatR;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Terminated, Direction.ServerToClient)]
- public class TerminatedEvent : IRequest
- {
- ///
- /// A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session.
- /// The value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests.
- ///
- [Optional]
- [JsonProperty(PropertyName = "__restart")]
- public JToken? Restart { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/TerminatedExtensions.cs b/src/Dap.Protocol/Events/TerminatedExtensions.cs
deleted file mode 100644
index b3a5bea30..000000000
--- a/src/Dap.Protocol/Events/TerminatedExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Terminated, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ITerminatedHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class TerminatedHandler : ITerminatedHandler
- {
- public abstract Task Handle(TerminatedEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Events/ThreadEvent.cs b/src/Dap.Protocol/Events/ThreadEvent.cs
deleted file mode 100644
index d6ca4db28..000000000
--- a/src/Dap.Protocol/Events/ThreadEvent.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Method(EventNames.Thread, Direction.ServerToClient)]
- public class ThreadEvent : IRequest
- {
- ///
- /// The reason for the event.
- /// Values: 'started', 'exited', etc.
- ///
- public string Reason { get; set; } = null!;
-
- ///
- /// The identifier of the thread.
- ///
- public long ThreadId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Events/ThreadExtensions.cs b/src/Dap.Protocol/Events/ThreadExtensions.cs
deleted file mode 100644
index 3dd91c7ad..000000000
--- a/src/Dap.Protocol/Events/ThreadExtensions.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Events
-{
- [Parallel]
- [Method(EventNames.Thread, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IThreadHandler : IJsonRpcNotificationHandler
- {
- }
-
- public abstract class ThreadHandler : IThreadHandler
- {
- public abstract Task Handle(ThreadEvent request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs b/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs
new file mode 100644
index 000000000..fe5bf491d
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs
@@ -0,0 +1,104 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Models
+ {
+
+ ///
+ /// Information about a Breakpoint created in setBreakpoints or setFunctionBreakpoints.
+ ///
+ public class Breakpoint
+ {
+ ///
+ /// An optional identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints.
+ ///
+ [Optional]
+ public long? Id { get; set; }
+
+ ///
+ /// If true breakpoint could be set (but not necessarily at the desired location).
+ ///
+ public bool Verified { get; set; }
+
+ ///
+ /// 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.
+ ///
+ [Optional]
+ public string? Message { get; set; }
+
+ ///
+ /// The source where the breakpoint is located.
+ ///
+ [Optional]
+ public Source? Source { get; set; }
+
+ ///
+ /// The start line of the actual range covered by the breakpoint.
+ ///
+ [Optional]
+ public int? Line { get; set; }
+
+ ///
+ /// An optional start column of the actual range covered by the breakpoint.
+ ///
+ [Optional]
+ public int? Column { get; set; }
+
+ ///
+ /// An optional end line of the actual range covered by the breakpoint.
+ ///
+ [Optional]
+ public int? EndLine { get; set; }
+
+ ///
+ /// An optional end column of the actual range covered by the breakpoint. If no end line is given, then the end column is assumed to be in the start line.
+ ///
+ [Optional]
+ public int? EndColumn { get; set; }
+
+ ///
+ /// An optional memory reference to where the breakpoint is set.
+ ///
+ [Optional]
+ public string? InstructionReference { get; set; }
+
+ ///
+ /// An optional offset from the instruction reference.
+ /// This can be negative.
+ ///
+ [Optional]
+ public int? Offset { get; set; }
+ }
+ }
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Breakpoint, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class BreakpointEvent : IRequest
+ {
+ ///
+ /// The reason for the event.
+ /// Values: 'changed', 'new', 'removed', etc.
+ ///
+ public string Reason { get; set; } = null!;
+
+ ///
+ /// The 'id' attribute is used to find the target breakpoint and the other attributes are used as the new values.
+ ///
+ public Breakpoint Breakpoint { get; set; } = null!;
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs b/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs
new file mode 100644
index 000000000..04ca5c173
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs
@@ -0,0 +1,243 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Models
+ {
+ ///
+ /// Information about the capabilities of a debug adapter.
+ ///
+ public class Capabilities
+ {
+ ///
+ /// The debug adapter supports the 'configurationDone' request.
+ ///
+ [Optional]
+ public bool SupportsConfigurationDoneRequest { get; set; }
+
+ ///
+ /// The debug adapter supports function breakpoints.
+ ///
+ [Optional]
+ public bool SupportsFunctionBreakpoints { get; set; }
+
+ ///
+ /// The debug adapter supports conditional breakpoints.
+ ///
+ [Optional]
+ public bool SupportsConditionalBreakpoints { get; set; }
+
+ ///
+ /// The debug adapter supports breakpoints that break execution after a specified long of hits.
+ ///
+ [Optional]
+ public bool SupportsHitConditionalBreakpoints { get; set; }
+
+ ///
+ /// The debug adapter supports a (side effect free) evaluate request for data hovers.
+ ///
+ [Optional]
+ public bool SupportsEvaluateForHovers { get; set; }
+
+ ///
+ /// Available filters or options for the setExceptionBreakpoints request.
+ ///
+ [Optional]
+ public Container? ExceptionBreakpointFilters { get; set; }
+
+ ///
+ /// The debug adapter supports stepping back via the 'stepBack' and 'reverseContinue' requests.
+ ///
+ [Optional]
+ public bool SupportsStepBack { get; set; }
+
+ ///
+ /// The debug adapter supports setting a variable to a value.
+ ///
+ [Optional]
+ public bool SupportsSetVariable { get; set; }
+
+ ///
+ /// The debug adapter supports restarting a frame.
+ ///
+ [Optional]
+ public bool SupportsRestartFrame { get; set; }
+
+ ///
+ /// The debug adapter supports the 'gotoTargets' request.
+ ///
+ [Optional]
+ public bool SupportsGotoTargetsRequest { get; set; }
+
+ ///
+ /// The debug adapter supports the 'stepInTargets' request.
+ ///
+ [Optional]
+ public bool SupportsStepInTargetsRequest { get; set; }
+
+ ///
+ /// The debug adapter supports the 'completions' request.
+ ///
+ [Optional]
+ public bool SupportsCompletionsRequest { get; set; }
+
+ ///
+ /// The debug adapter supports the 'modules' request.
+ ///
+ [Optional]
+ public bool SupportsModulesRequest { get; set; }
+
+ ///
+ /// The set of additional module information exposed by the debug adapter.
+ ///
+ [Optional]
+ public Container? AdditionalModuleColumns { get; set; }
+
+ ///
+ /// Checksum algorithms supported by the debug adapter.
+ ///
+ [Optional]
+ public Container? SupportedChecksumAlgorithms { get; set; }
+
+ ///
+ /// The debug adapter supports the 'restart' request. In this case a client should not implement 'restart' by terminating and relaunching the adapter but by calling the
+ /// RestartRequest.
+ ///
+ [Optional]
+ public bool SupportsRestartRequest { get; set; }
+
+ ///
+ /// The debug adapter supports 'exceptionOptions' on the setExceptionBreakpoints request.
+ ///
+ [Optional]
+ public bool SupportsExceptionOptions { get; set; }
+
+ ///
+ /// The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest.
+ ///
+ [Optional]
+ public bool SupportsValueFormattingOptions { get; set; }
+
+ ///
+ /// The debug adapter supports the 'exceptionInfo' request.
+ ///
+ [Optional]
+ public bool SupportsExceptionInfoRequest { get; set; }
+
+ ///
+ /// The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request.
+ ///
+ [Optional]
+ public bool SupportTerminateDebuggee { get; set; }
+
+ ///
+ /// The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the
+ /// 'StackTrace' request are supported.
+ ///
+ [Optional]
+ public bool SupportsDelayedStackTraceLoading { get; set; }
+
+ ///
+ /// The debug adapter supports the 'loadedSources' request.
+ ///
+ [Optional]
+ public bool SupportsLoadedSourcesRequest { get; set; }
+
+ ///
+ /// The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint.
+ ///
+ [Optional]
+ public bool SupportsLogPoints { get; set; }
+
+ ///
+ /// The debug adapter supports the 'terminateThreads' request.
+ ///
+ [Optional]
+ public bool SupportsTerminateThreadsRequest { get; set; }
+
+ ///
+ /// The debug adapter supports the 'setExpression' request.
+ ///
+ [Optional]
+ public bool SupportsSetExpression { get; set; }
+
+ ///
+ /// The debug adapter supports the 'terminate' request.
+ ///
+ [Optional]
+ public bool SupportsTerminateRequest { get; set; }
+
+ ///
+ /// The debug adapter supports data breakpoints.
+ ///
+ [Optional]
+ public bool SupportsDataBreakpoints { get; set; }
+
+ ///
+ /// The debug adapter supports the 'readMemory' request.
+ ///
+ [Optional]
+ public bool SupportsReadMemoryRequest { get; set; }
+
+ ///
+ /// The debug adapter supports the 'disassemble' request.
+ ///
+ [Optional]
+ public bool SupportsDisassembleRequest { get; set; }
+
+ ///
+ /// The debug adapter supports the 'cancel' request.
+ ///
+ [Optional]
+ public bool SupportsCancelRequest { get; set; }
+
+ ///
+ /// The debug adapter supports the 'breakpointLocations' request.
+ ///
+ [Optional]
+ public bool SupportsBreakpointLocationsRequest { get; set; }
+
+ ///
+ /// The debug adapter supports the 'clipboard' context value in the 'evaluate' request.
+ ///
+ [Optional]
+ public bool SupportsClipboardContext { get; set; }
+
+ ///
+ /// The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests.
+ ///
+ [Optional]
+ public bool SupportsSteppingGranularity { get; set; }
+
+ ///
+ /// The debug adapter supports adding breakpoints based on instruction references.
+ ///
+ [Optional]
+ public bool SupportsInstructionBreakpoints { get; set; }
+ }
+ }
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Capabilities, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class CapabilitiesEvent : IRequest
+ {
+ ///
+ /// The set of updated capabilities.
+ ///
+ public Capabilities Capabilities { get; set; } = null!;
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/ContinuedFeature.cs b/src/Dap.Protocol/Feature/Events/ContinuedFeature.cs
new file mode 100644
index 000000000..013da5a63
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/ContinuedFeature.cs
@@ -0,0 +1,34 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Continued, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ContinuedEvent : IRequest
+ {
+ ///
+ /// The thread which was continued.
+ ///
+ public long ThreadId { get; set; }
+
+ ///
+ /// If 'allThreadsContinued' is true, a debug adapter can announce that all threads have continued.
+ ///
+ [Optional]
+ public bool AllThreadsContinued { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/ExitedFeature.cs b/src/Dap.Protocol/Feature/Events/ExitedFeature.cs
new file mode 100644
index 000000000..8e02a25ff
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/ExitedFeature.cs
@@ -0,0 +1,27 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Exited, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ExitedEvent : IRequest
+ {
+ ///
+ /// The exit code returned from the debuggee.
+ ///
+ public long ExitCode { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/InitializedFeature.cs b/src/Dap.Protocol/Feature/Events/InitializedFeature.cs
new file mode 100644
index 000000000..dd1237f2d
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/InitializedFeature.cs
@@ -0,0 +1,23 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Initialized, Direction.ServerToClient)]
+ [
+ GenerateHandler(Name = "DebugAdapterInitialized"),
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class InitializedEvent : IRequest
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs b/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs
new file mode 100644
index 000000000..c4bd478d9
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs
@@ -0,0 +1,41 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.LoadedSource, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class LoadedSourceEvent : IRequest
+ {
+ ///
+ /// The reason for the event.
+ ///
+ public LoadedSourceReason Reason { get; set; }
+
+ ///
+ /// The new, changed, or removed source.
+ ///
+ public Source Source { get; set; } = null!;
+ }
+
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum LoadedSourceReason
+ {
+ New, Changed, Removed
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/ModuleFeature.cs b/src/Dap.Protocol/Feature/Events/ModuleFeature.cs
new file mode 100644
index 000000000..ab7603334
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/ModuleFeature.cs
@@ -0,0 +1,41 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Module, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ModuleEvent : IRequest
+ {
+ ///
+ /// The reason for the event.
+ ///
+ public ModuleEventReason Reason { get; set; }
+
+ ///
+ /// The new, changed, or removed module. In case of 'removed' only the module id is used.
+ ///
+ public Module Module { get; set; } = null!;
+ }
+
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum ModuleEventReason
+ {
+ New, Changed, Removed
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/OutputFeature.cs b/src/Dap.Protocol/Feature/Events/OutputFeature.cs
new file mode 100644
index 000000000..ee10a71e3
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/OutputFeature.cs
@@ -0,0 +1,67 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json.Linq;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Output, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class OutputEvent : IRequest
+ {
+ ///
+ /// The output category. If not specified, 'console' is assumed.
+ /// Values: 'console', 'stdout', 'stderr', 'telemetry', etc.
+ ///
+ [Optional]
+ public string? Category { get; set; }
+
+ ///
+ /// The output to report.
+ ///
+ public string Output { get; set; } = null!;
+
+ ///
+ /// If an attribute 'variablesReference' exists and its value is > 0, the output contains objects which can be retrieved by passing 'variablesReference' to the 'variables' request.
+ ///
+ [Optional]
+ public long? VariablesReference { get; set; }
+
+ ///
+ /// An optional source location where the output was produced.
+ ///
+ [Optional]
+ public Source? Source { get; set; }
+
+ ///
+ /// An optional source location line where the output was produced.
+ ///
+ [Optional]
+ public long? Line { get; set; }
+
+ ///
+ /// An optional source location column where the output was produced.
+ ///
+ [Optional]
+ public long? Column { get; set; }
+
+ ///
+ /// Optional data to report. For the 'telemetry' category the data will be sent to telemetry, for the other categories the data is shown in JSON format.
+ ///
+ [Optional]
+ public JToken? Data { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/ProcessFeature.cs b/src/Dap.Protocol/Feature/Events/ProcessFeature.cs
new file mode 100644
index 000000000..076a7657c
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/ProcessFeature.cs
@@ -0,0 +1,63 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Process, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ProcessEvent : IRequest
+ {
+ ///
+ /// The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js.
+ ///
+ public string Name { get; set; } = null!;
+
+ ///
+ /// The system process id of the debugged process. This property will be missing for non-system processes.
+ ///
+ [Optional]
+ public long? SystemProcessId { get; set; }
+
+ ///
+ /// If true, the process is running on the same computer as the debug adapter.
+ ///
+ [Optional]
+ public bool IsLocalProcess { get; set; }
+
+ ///
+ /// Describes how the debug engine started debugging this process.
+ /// 'launch': Process was launched under the debugger.
+ /// 'attach': Debugger attached to an existing process.
+ /// 'attachForSuspendedLaunch': A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.
+ ///
+ [Optional]
+ public ProcessEventStartMethod? StartMethod { get; set; }
+
+ ///
+ /// The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display.
+ ///
+ [Optional]
+ public long? PointerSize { get; set; }
+ }
+
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum ProcessEventStartMethod
+ {
+ Launch, Attach, AttachForSuspendedLaunch
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/ProgressFeature.cs b/src/Dap.Protocol/Feature/Events/ProgressFeature.cs
new file mode 100644
index 000000000..3565dca07
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/ProgressFeature.cs
@@ -0,0 +1,93 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Events;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ public abstract class ProgressEvent
+ {
+ ///
+ /// The ID that was introduced in the initial 'progressStart' event.
+ ///
+ public ProgressToken ProgressId { get; set; }
+
+ ///
+ /// Optional, more detailed progress message. If omitted, the previous message (if any) is used.
+ ///
+ [Optional]
+ public string? Message { get; set; }
+ }
+
+ [Parallel]
+ [Method(EventNames.ProgressStart, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ProgressStartEvent : ProgressEvent, IRequest
+ {
+ ///
+ /// Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation.
+ ///
+ public string Title { get; set; } = null!;
+
+ ///
+ /// The request ID that this progress report is related to. If specified a debug adapter is expected to emit
+ /// progress events for the long running request until the request has been either completed or cancelled.
+ /// If the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.
+ ///
+ [Optional]
+ public int? RequestId { get; set; }
+
+ ///
+ /// If true, the request that reports progress may be canceled with a 'cancel' request.
+ /// So this property basically controls whether the client should use UX that supports cancellation.
+ /// Clients that don't support cancellation are allowed to ignore the setting.
+ ///
+ [Optional]
+ public bool Cancellable { get; set; }
+
+ ///
+ /// Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown.
+ ///
+ [Optional]
+ public int? Percentage { get; set; }
+ }
+
+ [Parallel]
+ [Method(EventNames.ProgressUpdate, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ProgressUpdateEvent : ProgressEvent, IRequest
+ {
+ ///
+ /// Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown.
+ ///
+ [Optional]
+ public double? Percentage { get; set; }
+ }
+
+ [Parallel]
+ [Method(EventNames.ProgressEnd, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ProgressEndEvent : ProgressEvent, IRequest
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/StoppedFeature.cs b/src/Dap.Protocol/Feature/Events/StoppedFeature.cs
new file mode 100644
index 000000000..8ddca9031
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/StoppedFeature.cs
@@ -0,0 +1,62 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Stopped, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class StoppedEvent : IRequest
+ {
+ ///
+ /// The reason for the event.
+ /// For backward compatibility this string is shown in the UI if the 'description' attribute is missing (but it must not be translated).
+ /// Values: 'step', 'breakpoint', 'exception', 'pause', 'entry', 'goto', 'function breakpoint', 'data breakpoint', etc.
+ ///
+ public string Reason { get; set; } = null!;
+
+ ///
+ /// The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and must be translated.
+ ///
+ [Optional]
+ public string? Description { get; set; }
+
+ ///
+ /// The thread which was stopped.
+ ///
+ [Optional]
+ public long? ThreadId { get; set; }
+
+ ///
+ /// A value of true hints to the frontend that this event should not change the focus.
+ ///
+ [Optional]
+ public bool PreserveFocusHint { get; set; }
+
+ ///
+ /// Additional information. E.g. if reason is 'exception', text contains the exception name. This string is shown in the UI.
+ ///
+ [Optional]
+ public string? Text { get; set; }
+
+ ///
+ /// If 'allThreadsStopped' is true, a debug adapter can announce that all threads have stopped.
+ /// - The client should use this information to enable that all threads can be expanded to access their stacktraces.
+ /// - If the attribute is missing or false, only the thread with the given threadId can be expanded.
+ ///
+ [Optional]
+ public bool AllThreadsStopped { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/TerminatedFeature.cs b/src/Dap.Protocol/Feature/Events/TerminatedFeature.cs
new file mode 100644
index 000000000..29e18709d
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/TerminatedFeature.cs
@@ -0,0 +1,33 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Terminated, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class TerminatedEvent : IRequest
+ {
+ ///
+ /// A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session.
+ /// The value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests.
+ ///
+ [Optional]
+ [JsonProperty(PropertyName = "__restart")]
+ public JToken? Restart { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Events/ThreadFeature.cs b/src/Dap.Protocol/Feature/Events/ThreadFeature.cs
new file mode 100644
index 000000000..7e39ebb03
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Events/ThreadFeature.cs
@@ -0,0 +1,33 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Events
+ {
+ [Parallel]
+ [Method(EventNames.Thread, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ThreadEvent : IRequest
+ {
+ ///
+ /// The reason for the event.
+ /// Values: 'started', 'exited', etc.
+ ///
+ public string Reason { get; set; } = null!;
+
+ ///
+ /// The identifier of the thread.
+ ///
+ public long ThreadId { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/AttachFeature.cs b/src/Dap.Protocol/Feature/Requests/AttachFeature.cs
new file mode 100644
index 000000000..dbe392a09
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/AttachFeature.cs
@@ -0,0 +1,41 @@
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Attach, Direction.ClientToServer)]
+ [
+ GenerateHandler(Name = "Attach", AllowDerivedRequests = true),
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class AttachRequestArguments : IRequest
+ {
+ ///
+ /// Optional data from the previous, restarted session.
+ /// The data is sent as the 'restart' attribute of the 'terminated' event.
+ /// The client should leave the data intact.
+ ///
+ [Optional]
+ [JsonProperty(PropertyName = "__restart")]
+ public JToken? Restart { get; set; }
+
+ [JsonExtensionData] public IDictionary ExtensionData { get; set; } = new Dictionary();
+ }
+
+ public class AttachResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/BreakpointLocationsFeature.cs b/src/Dap.Protocol/Feature/Requests/BreakpointLocationsFeature.cs
new file mode 100644
index 000000000..a86700caf
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/BreakpointLocationsFeature.cs
@@ -0,0 +1,89 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.BreakpointLocations, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class BreakpointLocationsArguments : IRequest
+ {
+ ///
+ /// The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified.
+ ///
+ public Source Source { get; set; } = null!;
+
+ ///
+ /// Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.
+ ///
+ public int Line { get; set; }
+
+ ///
+ /// Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed.
+ ///
+ [Optional]
+ public int? Column { get; set; }
+
+ ///
+ /// Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line.
+ ///
+ [Optional]
+ public int? EndLine { get; set; }
+
+ ///
+ /// Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line.
+ ///
+ [Optional]
+ public int? EndColumn { get; set; }
+ }
+
+ public class BreakpointLocationsResponse
+ {
+ ///
+ /// Sorted set of possible breakpoint locations.
+ ///
+ public Container Breakpoints { get; set; } = null!;
+ }
+ }
+
+ namespace Models
+ {
+ public class BreakpointLocation
+ {
+ ///
+ /// Start line of breakpoint location.
+ ///
+ public int Line { get; set; }
+
+ ///
+ /// Optional start column of breakpoint location.
+ ///
+ [Optional]
+ public int? Column { get; set; }
+
+ ///
+ /// Optional end line of breakpoint location if the location covers a range.
+ ///
+ [Optional]
+ public int? EndLine { get; set; }
+
+ ///
+ /// Optional end column of breakpoint location if the location covers a range.
+ ///
+ [Optional]
+ public int? EndColumn { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/CancelFeature.cs b/src/Dap.Protocol/Feature/Requests/CancelFeature.cs
new file mode 100644
index 000000000..95e9180b3
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/CancelFeature.cs
@@ -0,0 +1,61 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+
+ ///
+ /// DAP is kind of silly....
+ /// Cancellation is for requests and progress tokens... hopefully if isn't ever expanded any further... because that would be fun.
+ ///
+ [Parallel]
+ [Method(RequestNames.Cancel, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class CancelArguments : IRequest
+ {
+ // This is removed on purpose, as request cancellation is handled by the DapReciever
+ // ///
+ // /// The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.
+ // /// Both a 'requestId' and a 'progressId' can be specified in one request.
+ // ///
+ // [Optional]
+ // public int? RequestId { get; set; }
+
+ ///
+ /// The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.
+ /// Both a 'requestId' and a 'progressId' can be specified in one request.
+ ///
+ [Optional]
+ public ProgressToken? ProgressId { get; set; }
+ }
+
+ public class CancelResponse
+ {
+ ///
+ /// The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.
+ /// Both a 'requestId' and a 'progressId' can be specified in one request.
+ ///
+ [Optional]
+ public int? RequestId { get; set; }
+
+ ///
+ /// The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.
+ /// Both a 'requestId' and a 'progressId' can be specified in one request.
+ ///
+ [Optional]
+ public ProgressToken? ProgressId { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/CompletionsFeature.cs b/src/Dap.Protocol/Feature/Requests/CompletionsFeature.cs
new file mode 100644
index 000000000..90ced02c5
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/CompletionsFeature.cs
@@ -0,0 +1,121 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Completions, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class CompletionsArguments : IRequest
+ {
+ ///
+ /// Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope.
+ ///
+ [Optional]
+ public long? FrameId { get; set; }
+
+ ///
+ /// One or more source lines.Typically this is the text a user has typed into the debug console before he asked for completion.
+ ///
+ public string Text { get; set; } = null!;
+
+ ///
+ /// The character position for which to determine the completion proposals.
+ ///
+ public long Column { get; set; }
+
+ ///
+ /// An optional line for which to determine the completion proposals.If missing the first line of the text is assumed.
+ ///
+ [Optional]
+ public long? Line { get; set; }
+ }
+
+ public class CompletionsResponse
+ {
+ ///
+ /// The possible completions for .
+ ///
+ public Container Targets { get; set; } = null!;
+ }
+ }
+
+ namespace Models
+ {
+ ///
+ /// CompletionItems are the suggestions returned from the CompletionsRequest.
+ ///
+ public class CompletionItem
+ {
+ ///
+ /// The label of this completion item. By default this is also the text that is inserted when selecting this completion.
+ ///
+ public string Label { get; set; } = null!;
+
+ ///
+ /// If text is not falsy then it is inserted instead of the label.
+ ///
+ [Optional]
+ public string? Text { get; set; } = null!;
+
+ ///
+ /// The item's type. Typically the client uses this information to render the item in the UI with an icon.
+ ///
+ [Optional]
+ public CompletionItemType Type { get; set; }
+
+ ///
+ /// This value determines the location (in the CompletionsRequest's 'text' attribute) where the completion text is added.
+ /// If missing the text is added at the location specified by the CompletionsRequest's 'column' attribute.
+ ///
+ [Optional]
+ public int? Start { get; set; }
+
+ ///
+ /// This value determines how many characters are overwritten by the completion text.
+ /// If missing the value 0 is assumed which results in the completion text being inserted.
+ ///
+ [Optional]
+ public int? Length { get; set; }
+
+ ///
+ /// Determines the start of the new selection after the text has been inserted (or replaced).
+ /// The start position must in the range 0 and length of the completion text.
+ /// If omitted the selection starts at the end of the completion text.
+ ///
+ [Optional]
+ public int? SelectionStart { get; set; }
+
+ ///
+ /// Determines the length of the new selection after the text has been inserted (or replaced).
+ /// The selection can not extend beyond the bounds of the completion text.
+ /// If omitted the length is assumed to be 0.
+ ///
+ [Optional]
+ public int? SelectionLength { get; set; }
+ }
+
+ ///
+ /// Some predefined types for the CompletionItem.Please note that not all clients have specific icons for all of them.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum CompletionItemType
+ {
+ Method, Function, Constructor, Field, Variable, Class, Interface, Module, Property, Unit, Value, Enum, Keyword, Snippet, Text, Color, File, Reference, CustomColor
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/ConfigurationDoneFeature.cs b/src/Dap.Protocol/Feature/Requests/ConfigurationDoneFeature.cs
new file mode 100644
index 000000000..650f1a9bd
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/ConfigurationDoneFeature.cs
@@ -0,0 +1,27 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.ConfigurationDone, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ConfigurationDoneArguments : IRequest
+ {
+ }
+
+ public class ConfigurationDoneResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/ContinueFeature.cs b/src/Dap.Protocol/Feature/Requests/ContinueFeature.cs
new file mode 100644
index 000000000..4e6c8f576
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/ContinueFeature.cs
@@ -0,0 +1,39 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Continue, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ContinueArguments : IRequest
+ {
+ ///
+ /// Continue execution for the specified thread(if possible). If the backend cannot continue on a single thread but will continue on all threads, it should set the
+ /// 'allThreadsContinued' attribute in the response to true.
+ ///
+ public long ThreadId { get; set; }
+ }
+
+ public class ContinueResponse
+ {
+ ///
+ /// If true, the 'continue' request has ignored the specified thread and continued all threads instead.If this attribute is missing a value of 'true' is assumed for backward
+ /// compatibility.
+ ///
+ [Optional]
+ public bool AllThreadsContinued { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/DataBreakpointInfoFeature.cs b/src/Dap.Protocol/Feature/Requests/DataBreakpointInfoFeature.cs
new file mode 100644
index 000000000..368eb4d53
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/DataBreakpointInfoFeature.cs
@@ -0,0 +1,62 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.DataBreakpointInfo, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class DataBreakpointInfoArguments : IRequest
+ {
+ ///
+ /// Reference to the Variable container if the data breakpoint is requested for a child of the container.
+ ///
+ [Optional]
+ public long? VariablesReference { get; set; }
+
+ ///
+ /// The name of the Variable's child to obtain data breakpoint information for. If variableReference isn’t provided, this can be an expression.
+ ///
+ public string Name { get; set; } = null!;
+ }
+
+ public class DataBreakpointInfoResponse
+ {
+ ///
+ /// An identifier for the data on which a data breakpoint can be registered with the setDataBreakpoints request or null if no data breakpoint is available.
+ ///
+ public string DataId { get; set; } = null!;
+
+ ///
+ /// UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available.
+ ///
+ public string Description { get; set; } = null!;
+
+ ///
+ /// Optional attribute listing the available access types for a potential data breakpoint.A UI frontend could surface this information.
+ ///
+ [Optional]
+ public Container? AccessTypes { get; set; }
+
+ ///
+ /// Optional attribute indicating that a potential data breakpoint could be persisted across sessions.
+ ///
+ [Optional]
+ public bool CanPersist { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/DisassembleFeature.cs b/src/Dap.Protocol/Feature/Requests/DisassembleFeature.cs
new file mode 100644
index 000000000..0b012ae34
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/DisassembleFeature.cs
@@ -0,0 +1,125 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Disassemble, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class DisassembleArguments : IRequest
+ {
+ ///
+ /// Memory reference to the base location containing the instructions to disassemble.
+ ///
+ public string MemoryReference { get; set; } = null!;
+
+ ///
+ /// Optional offset(in bytes) to be applied to the reference location before disassembling.Can be negative.
+ ///
+ [Optional]
+ public long? Offset { get; set; }
+
+ ///
+ /// Optional offset(in instructions) to be applied after the byte offset(if any) before disassembling.Can be negative.
+ ///
+
+ [Optional]
+ public long? InstructionOffset { get; set; }
+
+ ///
+ /// Number of instructions to disassemble starting at the specified location and offset.An adapter must return exactly this number of instructions - any unavailable instructions
+ /// should be replaced with an implementation-defined 'invalid instruction' value.
+ ///
+ public long InstructionCount { get; set; }
+
+ ///
+ /// If true, the adapter should attempt to resolve memory addresses and other values to symbolic names.
+ ///
+ [Optional]
+ public bool ResolveSymbols { get; set; }
+ }
+
+ public class DisassembleResponse
+ {
+ ///
+ /// The list of disassembled instructions.
+ ///
+ public Container Instructions { get; set; } = null!;
+ }
+ }
+
+ namespace Models
+ {
+ ///
+ /// DisassembledInstruction
+ /// Represents a single disassembled instruction.
+ ///
+ public class DisassembledInstruction
+ {
+ ///
+ /// The address of the instruction. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise.
+ ///
+ public string Address { get; set; } = null!;
+
+ ///
+ /// Optional raw bytes representing the instruction and its operands, in an implementation-defined format.
+ ///
+ [Optional]
+ public string? InstructionBytes { get; set; }
+
+ ///
+ /// Text representing the instruction and its operands, in an implementation-defined format.
+ ///
+ public string Instruction { get; set; } = null!;
+
+ ///
+ /// Name of the symbol that correponds with the location of this instruction, if any.
+ ///
+ [Optional]
+ public string? Symbol { get; set; }
+
+ ///
+ /// Source location that corresponds to this instruction, if any. Should always be set (if available) on the first instruction returned, but can be omitted afterwards if this
+ /// instruction maps to the same source file as the previous instruction.
+ ///
+ [Optional]
+ public Source? Location { get; set; }
+
+ ///
+ /// The line within the source location that corresponds to this instruction, if any.
+ ///
+ [Optional]
+ public int? Line { get; set; }
+
+ ///
+ /// The column within the line that corresponds to this instruction, if any.
+ ///
+ [Optional]
+ public int? Column { get; set; }
+
+ ///
+ /// The end line of the range that corresponds to this instruction, if any.
+ ///
+ [Optional]
+ public int? EndLine { get; set; }
+
+ ///
+ /// The end column of the range that corresponds to this instruction, if any.
+ ///
+ [Optional]
+ public int? EndColumn { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/DisconnectFeature.cs b/src/Dap.Protocol/Feature/Requests/DisconnectFeature.cs
new file mode 100644
index 000000000..a5e2af7e7
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/DisconnectFeature.cs
@@ -0,0 +1,41 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Disconnect, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class DisconnectArguments : IRequest
+ {
+ ///
+ /// A value of true indicates that this 'disconnect' request is part of a restart sequence.
+ ///
+ [Optional]
+ public bool Restart { get; set; }
+
+ ///
+ /// Indicates whether the debuggee should be terminated when the debugger is disconnected.
+ /// If unspecified, the debug adapter is free to do whatever it thinks is best.
+ /// A client can only rely on this attribute being properly honored if a debug adapter returns true for the 'supportTerminateDebuggee' capability.
+ ///
+ [Optional]
+ public bool TerminateDebuggee { get; set; }
+ }
+
+ public class DisconnectResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/EvaluateFeature.cs b/src/Dap.Protocol/Feature/Requests/EvaluateFeature.cs
new file mode 100644
index 000000000..723fa92eb
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/EvaluateFeature.cs
@@ -0,0 +1,97 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Evaluate, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class EvaluateArguments : IRequest
+ {
+ ///
+ /// The expression to evaluate.
+ ///
+ public string Expression { get; set; } = null!;
+
+ ///
+ /// Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope.
+ ///
+ [Optional]
+ public long? FrameId { get; set; }
+
+ ///
+ /// The context in which the evaluate request is run.
+ /// Values:
+ /// 'watch': evaluate is run in a watch.
+ /// 'repl': evaluate is run from REPL console.
+ /// 'hover': evaluate is run from a data hover.
+ /// etc.
+ ///
+ [Optional]
+ public string? Context { get; set; }
+
+ ///
+ /// Specifies details on how to format the Evaluate result.
+ ///
+ [Optional]
+ public ValueFormat? Format { get; set; }
+ }
+
+ public class EvaluateResponse
+ {
+ ///
+ /// The result of the evaluate request.
+ ///
+ public string Result { get; set; } = null!;
+
+ ///
+ /// The optional type of the evaluate result.
+ ///
+ [Optional]
+ public string? Type { get; set; }
+
+ ///
+ /// Properties of a evaluate result that can be used to determine how to render the result in the UI.
+ ///
+ [Optional]
+ public VariablePresentationHint? PresentationHint { get; set; }
+
+ ///
+ /// If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.
+ ///
+ public long VariablesReference { get; set; }
+
+ ///
+ /// The number of named child variables.
+ /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
+ ///
+ [Optional]
+ public long? NamedVariables { get; set; }
+
+ ///
+ /// The number of indexed child variables.
+ /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
+ ///
+ [Optional]
+ public long? IndexedVariables { get; set; }
+
+ ///
+ /// Memory reference to a location appropriate for this result.For pointer type eval results, this is generally a reference to the memory address contained in the pointer.
+ ///
+ [Optional]
+ public string? MemoryReference { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/ExceptionInfoFeature.cs b/src/Dap.Protocol/Feature/Requests/ExceptionInfoFeature.cs
new file mode 100644
index 000000000..cb9b8eaa1
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/ExceptionInfoFeature.cs
@@ -0,0 +1,54 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.ExceptionInfo, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ExceptionInfoArguments : IRequest
+ {
+ ///
+ /// Thread for which exception information should be retrieved.
+ ///
+ public long ThreadId { get; set; }
+ }
+
+ public class ExceptionInfoResponse
+ {
+ ///
+ /// ID of the exception that was thrown.
+ ///
+ public string ExceptionId { get; set; } = null!;
+
+ ///
+ /// Descriptive text for the exception provided by the debug adapter.
+ ///
+ [Optional]
+ public string? Description { get; set; }
+
+ ///
+ /// Mode that caused the exception notification to be raised.
+ ///
+ public ExceptionBreakMode BreakMode { get; set; }
+
+ ///
+ /// Detailed information about the exception.
+ ///
+ [Optional]
+ public ExceptionDetails? Details { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/GotoFeature.cs b/src/Dap.Protocol/Feature/Requests/GotoFeature.cs
new file mode 100644
index 000000000..7831c2977
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/GotoFeature.cs
@@ -0,0 +1,36 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Goto, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class GotoArguments : IRequest
+ {
+ ///
+ /// Set the goto target for this thread.
+ ///
+ public long ThreadId { get; set; }
+
+ ///
+ /// The location where the debuggee will continue to run.
+ ///
+ public long TargetId { get; set; }
+ }
+
+ public class GotoResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/GotoTargetsFeature.cs b/src/Dap.Protocol/Feature/Requests/GotoTargetsFeature.cs
new file mode 100644
index 000000000..78fcf0b2a
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/GotoTargetsFeature.cs
@@ -0,0 +1,97 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.GotoTargets, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class GotoTargetsArguments : IRequest
+ {
+ ///
+ /// The source location for which the goto targets are determined.
+ ///
+ public Source Source { get; set; } = null!;
+
+ ///
+ /// The line location for which the goto targets are determined.
+ ///
+ public long Line { get; set; }
+
+ ///
+ /// An optional column location for which the goto targets are determined.
+ ///
+ [Optional]
+ public long? Column { get; set; }
+ }
+
+ public class GotoTargetsResponse
+ {
+ ///
+ /// The possible goto targets of the specified location.
+ ///
+ public Container Targets { get; set; } = null!;
+ }
+ }
+
+ namespace Models
+ {
+ ///
+ /// A GotoTarget describes a code location that can be used as a target in the ‘goto’ request.
+ /// The possible goto targets can be determined via the ‘gotoTargets’ request.
+ ///
+ public class GotoTarget
+ {
+ ///
+ /// Unique identifier for a goto target. This is used in the goto request.
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// The name of the goto target (shown in the UI).
+ ///
+ public string Label { get; set; } = null!;
+
+ ///
+ /// The line of the goto target.
+ ///
+ public int Line { get; set; }
+
+ ///
+ /// An optional column of the goto target.
+ ///
+ [Optional]
+ public int? Column { get; set; }
+
+ ///
+ /// An optional end line of the range covered by the goto target.
+ ///
+ [Optional]
+ public int? EndLine { get; set; }
+
+ ///
+ /// An optional end column of the range covered by the goto target.
+ ///
+ [Optional]
+ public int? EndColumn { get; set; }
+
+ ///
+ /// Optional memory reference for the instruction pointer value represented by this target.
+ ///
+ [Optional]
+ public string? InstructionPointerReference { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/InitializeRequestFeature.cs b/src/Dap.Protocol/Feature/Requests/InitializeRequestFeature.cs
new file mode 100644
index 000000000..18e0220e9
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/InitializeRequestFeature.cs
@@ -0,0 +1,103 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Initialize, Direction.ClientToServer)]
+ [
+ GenerateHandler(Name = "DebugAdapterInitialize"),
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class InitializeRequestArguments : IRequest, IInitializeRequestArguments
+ {
+ ///
+ /// The ID of the(frontend) client using this adapter.
+ ///
+
+ [Optional]
+ public string? ClientId { get; set; }
+
+ ///
+ /// The human readable name of the(frontend) client using this adapter.
+ ///
+
+ [Optional]
+ public string? ClientName { get; set; }
+
+ ///
+ /// The ID of the debug adapter.
+ ///
+ public string AdapterId { get; set; } = null!;
+
+ ///
+ /// The ISO-639 locale of the(frontend) client using this adapter, e.g.en-US or de-CH.
+ ///
+
+ [Optional]
+ public string? Locale { get; set; }
+
+ ///
+ /// If true all line numbers are 1-based(default).
+ ///
+ [Optional]
+ public bool LinesStartAt1 { get; set; }
+
+ ///
+ /// If true all column numbers are 1-based(default).
+ ///
+ [Optional]
+ public bool ColumnsStartAt1 { get; set; }
+
+ ///
+ /// Determines in what format paths are specified.The default is 'path', which is the native format.
+ /// Values: 'path', 'uri', etc.
+ ///
+ [Optional]
+ public string? PathFormat { get; set; }
+
+ ///
+ /// Client supports the optional type attribute for variables.
+ ///
+ [Optional]
+ public bool SupportsVariableType { get; set; }
+
+ ///
+ /// Client supports the paging of variables.
+ ///
+ [Optional]
+ public bool SupportsVariablePaging { get; set; }
+
+ ///
+ /// Client supports the runInTerminal request.
+ ///
+ [Optional]
+ public bool SupportsRunInTerminalRequest { get; set; }
+
+ ///
+ /// Client supports memory references.
+ ///
+ [Optional]
+ public bool SupportsMemoryReferences { get; set; }
+
+ ///
+ /// Client supports progress reporting.
+ ///
+ [Optional]
+ public bool SupportsProgressReporting { get; set; }
+ }
+
+ public class InitializeResponse : Capabilities
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/LaunchFeature.cs b/src/Dap.Protocol/Feature/Requests/LaunchFeature.cs
new file mode 100644
index 000000000..23869bf1b
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/LaunchFeature.cs
@@ -0,0 +1,47 @@
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Launch, Direction.ClientToServer)]
+ [
+ GenerateHandler(Name = "Launch", AllowDerivedRequests = true),
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class LaunchRequestArguments : IRequest
+ {
+ ///
+ /// If noDebug is true the launch request should launch the program without enabling debugging.
+ ///
+ [Optional]
+ public bool NoDebug { get; set; }
+
+ ///
+ /// Optional data from the previous, restarted session.
+ /// The data is sent as the 'restart' attribute of the 'terminated' event.
+ /// The client should leave the data intact.
+ ///
+ [Optional]
+ [JsonProperty(PropertyName = "__restart")]
+ public JToken? Restart { get; set; }
+
+ [JsonExtensionData] public IDictionary ExtensionData { get; set; } = new Dictionary();
+ }
+
+ public class LaunchResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/LoadedSourcesFeature.cs b/src/Dap.Protocol/Feature/Requests/LoadedSourcesFeature.cs
new file mode 100644
index 000000000..b459d22b0
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/LoadedSourcesFeature.cs
@@ -0,0 +1,36 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.LoadedSources, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class LoadedSourcesArguments : IRequest
+ {
+ }
+
+ public class LoadedSourcesResponse
+ {
+ ///
+ /// Set of loaded sources.
+ ///
+ public Container Sources { get; set; } = null!;
+ }
+ }
+
+ namespace Models
+ {
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/ModulesFeature.cs b/src/Dap.Protocol/Feature/Requests/ModulesFeature.cs
new file mode 100644
index 000000000..b7f725fc8
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/ModulesFeature.cs
@@ -0,0 +1,54 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Modules, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ModulesArguments : IRequest
+ {
+ ///
+ /// The index of the first module to return; if omitted modules start at 0.
+ ///
+ [Optional]
+ public long? StartModule { get; set; }
+
+ ///
+ /// The number of modules to return. If moduleCount is not specified or 0, all modules are returned.
+ ///
+ [Optional]
+ public long? ModuleCount { get; set; }
+ }
+
+ public class ModulesResponse
+ {
+ ///
+ /// All modules or range of modules.
+ ///
+ public Container Modules { get; set; } = null!;
+
+ ///
+ /// The total number of modules available.
+ ///
+ [Optional]
+ public long? TotalModules { get; set; }
+ }
+ }
+
+ namespace Models
+ {
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/NextFeature.cs b/src/Dap.Protocol/Feature/Requests/NextFeature.cs
new file mode 100644
index 000000000..4e746e41a
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/NextFeature.cs
@@ -0,0 +1,39 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Next, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class NextArguments : IRequest
+ {
+ ///
+ /// Execute 'next' for this thread.
+ ///
+ public long ThreadId { get; set; }
+
+ ///
+ /// Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.
+ ///
+ [Optional]
+ public SteppingGranularity Granularity { get; set; }
+ }
+
+ public class NextResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/PauseFeature.cs b/src/Dap.Protocol/Feature/Requests/PauseFeature.cs
new file mode 100644
index 000000000..191bd9ad0
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/PauseFeature.cs
@@ -0,0 +1,31 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Pause, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class PauseArguments : IRequest
+ {
+ ///
+ /// Pause execution for this thread.
+ ///
+ public long ThreadId { get; set; }
+ }
+
+ public class PauseResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/ReadMemoryFeature.cs b/src/Dap.Protocol/Feature/Requests/ReadMemoryFeature.cs
new file mode 100644
index 000000000..63284a18d
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/ReadMemoryFeature.cs
@@ -0,0 +1,61 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.ReadMemory, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ReadMemoryArguments : IRequest
+ {
+ ///
+ /// Memory reference to the base location from which data should be read.
+ ///
+ public string MemoryReference { get; set; } = null!;
+
+ ///
+ /// Optional offset(in bytes) to be applied to the reference location before reading data.Can be negative.
+ ///
+
+ [Optional]
+ public long? Offset { get; set; }
+
+ ///
+ /// Number of bytes to read at the specified location and offset.
+ ///
+ public long Count { get; set; }
+ }
+
+ public class ReadMemoryResponse
+ {
+ ///
+ /// The address of the first byte of data returned.Treated as a hex value if prefixed with '0x', or as a decimal value otherwise.
+ ///
+ public string Address { get; set; } = null!;
+
+ ///
+ /// The number of unreadable bytes encountered after the last successfully read byte. This can be used to determine the number of bytes that must be skipped before a subsequent
+ /// 'readMemory' request will succeed.
+ ///
+ [Optional]
+ public long? UnreadableBytes { get; set; }
+
+ ///
+ /// The bytes read from memory, encoded using base64.
+ ///
+ [Optional]
+ public string? Data { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/RestartFeature.cs b/src/Dap.Protocol/Feature/Requests/RestartFeature.cs
new file mode 100644
index 000000000..585cb01d3
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/RestartFeature.cs
@@ -0,0 +1,27 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Restart, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class RestartArguments : IRequest
+ {
+ }
+
+ public class RestartResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/RestartFrameFeature.cs b/src/Dap.Protocol/Feature/Requests/RestartFrameFeature.cs
new file mode 100644
index 000000000..16dbcb9cf
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/RestartFrameFeature.cs
@@ -0,0 +1,31 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.RestartFrame, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class RestartFrameArguments : IRequest
+ {
+ ///
+ /// Restart this stackframe.
+ ///
+ public long FrameId { get; set; }
+ }
+
+ public class RestartFrameResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/ReverseContinueFeature.cs b/src/Dap.Protocol/Feature/Requests/ReverseContinueFeature.cs
new file mode 100644
index 000000000..5fb893cfe
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/ReverseContinueFeature.cs
@@ -0,0 +1,31 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.ReverseContinue, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ReverseContinueArguments : IRequest
+ {
+ ///
+ /// Execute 'reverseContinue' for this thread.
+ ///
+ public long ThreadId { get; set; }
+ }
+
+ public class ReverseContinueResponse
+ {
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/RunInTerminalFeature.cs b/src/Dap.Protocol/Feature/Requests/RunInTerminalFeature.cs
new file mode 100644
index 000000000..efaefd237
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/RunInTerminalFeature.cs
@@ -0,0 +1,77 @@
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.RunInTerminal, Direction.ServerToClient)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class RunInTerminalArguments : IRequest
+ {
+ ///
+ /// What kind of terminal to launch.
+ ///
+ [Optional]
+ public RunInTerminalArgumentsKind? Kind { get; set; }
+
+ ///
+ /// Optional title of the terminal.
+ ///
+ [Optional]
+ public string? Title { get; set; }
+
+ ///
+ /// Working directory of the command.
+ ///
+ public string Cwd { get; set; } = null!;
+
+ ///
+ /// List of arguments.The first argument is the command to run.
+ ///
+ public Container Args { get; set; } = null!;
+
+ ///
+ /// Environment key-value pairs that are added to or removed from the default environment.
+ ///
+ [Optional]
+ public IDictionary? Env { get; set; }
+ }
+
+ public class RunInTerminalResponse
+ {
+ ///
+ /// The process ID.
+ ///
+ [Optional]
+ public long? ProcessId { get; set; }
+
+ ///
+ /// The process ID of the terminal shell.
+ ///
+ [Optional]
+ public long? ShellProcessId { get; set; }
+ }
+
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum RunInTerminalArgumentsKind
+ {
+ Integrated,
+ External
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/ScopesFeature.cs b/src/Dap.Protocol/Feature/Requests/ScopesFeature.cs
new file mode 100644
index 000000000..1db8b2561
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/ScopesFeature.cs
@@ -0,0 +1,116 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Scopes, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ScopesArguments : IRequest
+ {
+ ///
+ /// Retrieve the scopes for this stackframe.
+ ///
+ public long FrameId { get; set; }
+ }
+
+ public class ScopesResponse
+ {
+ ///
+ /// The scopes of the stackframe.If the array has length zero, there are no scopes available.
+ ///
+ public Container Scopes { get; set; } = null!;
+ }
+ }
+
+ namespace Models
+ {
+ ///
+ /// A Scope is a named container for variables.Optionally a scope can map to a source or a range within a source.
+ ///
+ public class Scope
+ {
+ ///
+ /// Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated.
+ ///
+ public string Name { get; set; } = null!;
+
+ ///
+ /// An optional hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.
+ /// Values:
+ /// 'arguments': Scope contains method arguments.
+ /// 'locals': Scope contains local variables.
+ /// 'registers': Scope contains registers. Only a single 'registers' scope should be returned from a 'scopes' request.
+ /// etc.
+ ///
+ [Optional]
+ public string? PresentationHint { get; set; }
+
+ ///
+ /// The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest.
+ ///
+ public long VariablesReference { get; set; }
+
+ ///
+ /// The long of named variables in this scope.
+ /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
+ ///
+ [Optional]
+ public long? NamedVariables { get; set; }
+
+ ///
+ /// The long of indexed variables in this scope.
+ /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
+ ///
+ [Optional]
+ public long? IndexedVariables { get; set; }
+
+ ///
+ /// If true, the long of variables in this scope is large or expensive to retrieve.
+ ///
+ public bool Expensive { get; set; }
+
+ ///
+ /// Optional source for this scope.
+ ///
+ [Optional]
+ public Source? Source { get; set; }
+
+ ///
+ /// Optional start line of the range covered by this scope.
+ ///
+ [Optional]
+ public int? Line { get; set; }
+
+ ///
+ /// Optional start column of the range covered by this scope.
+ ///
+ [Optional]
+ public int? Column { get; set; }
+
+ ///
+ /// Optional end line of the range covered by this scope.
+ ///
+ [Optional]
+ public int? EndLine { get; set; }
+
+ ///
+ /// Optional end column of the range covered by this scope.
+ ///
+ [Optional]
+ public int? EndColumn { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/SetBreakpointsFeature.cs b/src/Dap.Protocol/Feature/Requests/SetBreakpointsFeature.cs
new file mode 100644
index 000000000..1feb17c6f
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/SetBreakpointsFeature.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.SetBreakpoints, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class SetBreakpointsArguments : IRequest
+ {
+ ///
+ /// The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified.
+ ///
+ public Source Source { get; set; } = null!;
+
+ ///
+ /// The code locations of the breakpoints.
+ ///
+ [Optional]
+ public Container? Breakpoints { get; set; }
+
+ ///
+ /// Deprecated: The code locations of the breakpoints.
+ ///
+ [Obsolete("Deprecated")]
+ [Optional]
+ public Container? Lines { get; set; }
+
+ ///
+ /// A value of true indicates that the underlying source has been modified which results in new breakpoint locations.
+ ///
+ [Optional]
+ public bool SourceModified { get; set; }
+ }
+
+ public class SetBreakpointsResponse
+ {
+ ///
+ /// Information about the breakpoints.The array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments.
+ ///
+ public Container Breakpoints { get; set; } = null!;
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/SetDataBreakpointsFeature.cs b/src/Dap.Protocol/Feature/Requests/SetDataBreakpointsFeature.cs
new file mode 100644
index 000000000..47b7c681a
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/SetDataBreakpointsFeature.cs
@@ -0,0 +1,36 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.SetDataBreakpoints, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class SetDataBreakpointsArguments : IRequest
+ {
+ ///
+ /// The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints.
+ ///
+ public Container Breakpoints { get; set; } = null!;
+ }
+
+ public class SetDataBreakpointsResponse
+ {
+ ///
+ /// Information about the data breakpoints.The array elements correspond to the elements of the input argument 'breakpoints' array.
+ ///
+ public Container Breakpoints { get; set; } = null!;
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/SetExceptionBreakpointsFeature.cs b/src/Dap.Protocol/Feature/Requests/SetExceptionBreakpointsFeature.cs
new file mode 100644
index 000000000..f9713300a
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/SetExceptionBreakpointsFeature.cs
@@ -0,0 +1,94 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.SetExceptionBreakpoints, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class SetExceptionBreakpointsArguments : IRequest
+ {
+ ///
+ /// IDs of checked exception options.The set of IDs is returned via the 'exceptionBreakpointFilters' capability.
+ ///
+ public Container Filters { get; set; } = null!;
+
+ ///
+ /// Configuration options for selected exceptions.
+ ///
+ [Optional]
+ public Container? ExceptionOptions { get; set; }
+ }
+
+ public class SetExceptionBreakpointsResponse
+ {
+ }
+ }
+
+ namespace Models
+ {
+ ///
+ /// ExceptionOptions
+ /// An ExceptionOptions assigns configuration options to a set of exceptions.
+ ///
+ public class ExceptionOptions
+ {
+ ///
+ /// A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected. By convention the first segment of the path is a category that is
+ /// used to group exceptions in the UI.
+ ///
+ [Optional]
+ public Container? Path { get; set; }
+
+ ///
+ /// Condition when a thrown exception should result in a break.
+ ///
+ public ExceptionBreakMode BreakMode { get; set; }
+ }
+
+ ///
+ /// An ExceptionPathSegment represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.If a segment consists of more than one name, it matches the
+ /// names provided if ‘negate’ is false or missing or it matches anything except the names provided if ‘negate’ is true.
+ ///
+ public class ExceptionPathSegment
+ {
+ ///
+ /// If false or missing this segment matches the names provided, otherwise it matches anything except the names provided.
+ ///
+ [Optional]
+ public bool Negate { get; set; }
+
+ ///
+ /// Depending on the value of 'negate' the names that should match or not match.
+ ///
+ public Container Names { get; set; } = null!;
+ }
+
+ ///
+ /// This enumeration defines all possible conditions when a thrown exception should result in a break.
+ /// never: never breaks,
+ /// always: always breaks,
+ /// unhandled: breaks when exception unhandled,
+ /// userUnhandled: breaks if the exception is not handled by user code.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum ExceptionBreakMode
+ {
+ Never, Always, Unhandled, UserUnhandled
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/SetExpressionFeature.cs b/src/Dap.Protocol/Feature/Requests/SetExpressionFeature.cs
new file mode 100644
index 000000000..af16f904b
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/SetExpressionFeature.cs
@@ -0,0 +1,86 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.SetExpression, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class SetExpressionArguments : IRequest
+ {
+ ///
+ /// The l-value expression to assign to.
+ ///
+ public string Expression { get; set; } = null!;
+
+ ///
+ /// The value expression to assign to the l-value expression.
+ ///
+ public string Value { get; set; } = null!;
+
+ ///
+ /// Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope.
+ ///
+ [Optional]
+ public long? FrameId { get; set; }
+
+ ///
+ /// Specifies how the resulting value should be formatted.
+ ///
+ [Optional]
+ public ValueFormat? Format { get; set; }
+ }
+
+ public class SetExpressionResponse
+ {
+ ///
+ /// The new value of the expression.
+ ///
+ public string Value { get; set; } = null!;
+
+ ///
+ /// The optional type of the value.
+ ///
+ [Optional]
+ public string? Type { get; set; }
+
+ ///
+ /// Properties of a value that can be used to determine how to render the result in the UI.
+ ///
+ [Optional]
+ public VariablePresentationHint? PresentationHint { get; set; }
+
+ ///
+ /// If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.
+ ///
+ [Optional]
+ public long? VariablesReference { get; set; }
+
+ ///
+ /// The number of named child variables.
+ /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
+ ///
+ [Optional]
+ public long? NamedVariables { get; set; }
+
+ ///
+ /// The number of indexed child variables.
+ /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
+ ///
+ [Optional]
+ public long? IndexedVariables { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/SetFunctionBreakpointsFeature.cs b/src/Dap.Protocol/Feature/Requests/SetFunctionBreakpointsFeature.cs
new file mode 100644
index 000000000..7accc1718
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/SetFunctionBreakpointsFeature.cs
@@ -0,0 +1,64 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.SetFunctionBreakpoints, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class SetFunctionBreakpointsArguments : IRequest
+ {
+ ///
+ /// The function names of the breakpoints.
+ ///
+ public Container Breakpoints { get; set; } = null!;
+ }
+
+ public class SetFunctionBreakpointsResponse
+ {
+ ///
+ /// Information about the breakpoints.The array elements correspond to the elements of the 'breakpoints' array.
+ ///
+ public Container Breakpoints { get; set; } = null!;
+ }
+ }
+
+ namespace Models
+ {
+ ///
+ /// FunctionBreakpoint
+ /// Properties of a breakpoint passed to the setFunctionBreakpoints request.
+ ///
+ public class FunctionBreakpoint
+ {
+ ///
+ /// The name of the function.
+ ///
+ public string Name { get; set; } = null!;
+
+ ///
+ /// An optional expression for conditional breakpoints.
+ ///
+ [Optional]
+ public string? Condition { get; set; }
+
+ ///
+ /// An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed.
+ ///
+ [Optional]
+ public string? HitCondition { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/SetInstructionBreakpointsFeature.cs b/src/Dap.Protocol/Feature/Requests/SetInstructionBreakpointsFeature.cs
new file mode 100644
index 000000000..e287143bd
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/SetInstructionBreakpointsFeature.cs
@@ -0,0 +1,40 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.SetInstructionBreakpoints, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class SetInstructionBreakpointsArguments : IRequest
+ {
+ ///
+ /// The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints.
+ ///
+ public Container Breakpoints { get; set; } = null!;
+ }
+
+ public class SetInstructionBreakpointsResponse
+ {
+ ///
+ /// Information about the data breakpoints.The array elements correspond to the elements of the input argument 'breakpoints' array.
+ ///
+ public Container Breakpoints { get; set; } = null!;
+ }
+ }
+
+ namespace Models
+ {
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/SetVariableFeature.cs b/src/Dap.Protocol/Feature/Requests/SetVariableFeature.cs
new file mode 100644
index 000000000..50d66cbdc
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/SetVariableFeature.cs
@@ -0,0 +1,79 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.SetVariable, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class SetVariableArguments : IRequest
+ {
+ ///
+ /// The reference of the variable container.
+ ///
+ public long VariablesReference { get; set; }
+
+ ///
+ /// The name of the variable in the container.
+ ///
+ public string Name { get; set; } = null!;
+
+ ///
+ /// The value of the variable.
+ ///
+ public string Value { get; set; } = null!;
+
+ ///
+ /// Specifies details on how to format the response value.
+ ///
+ [Optional]
+ public ValueFormat? Format { get; set; }
+ }
+
+ public class SetVariableResponse
+ {
+ ///
+ /// The new value of the variable.
+ ///
+ public string Value { get; set; } = null!;
+
+ ///
+ /// The type of the new value.Typically shown in the UI when hovering over the value.
+ ///
+ [Optional]
+ public string? Type { get; set; }
+
+ ///
+ /// If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.
+ ///
+ [Optional]
+ public long? VariablesReference { get; set; }
+
+ ///
+ /// The number of named child variables.
+ /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
+ ///
+ [Optional]
+ public long? NamedVariables { get; set; }
+
+ ///
+ /// The number of indexed child variables.
+ /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
+ ///
+ [Optional]
+ public long? IndexedVariables { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/SourceFeature.cs b/src/Dap.Protocol/Feature/Requests/SourceFeature.cs
new file mode 100644
index 000000000..3a6c91723
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/SourceFeature.cs
@@ -0,0 +1,53 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Source, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class SourceArguments : IRequest
+ {
+ ///
+ /// Specifies the source content to load.Either source.path or source.sourceReference must be specified.
+ ///
+ [Optional]
+ public Source? Source { get; set; }
+
+ ///
+ /// The reference to the source.This is the same as source.sourceReference.This is provided for backward compatibility since old backends do not understand the 'source' attribute.
+ ///
+ public long SourceReference { get; set; }
+ }
+
+ public class SourceResponse
+ {
+ ///
+ /// Content of the source reference.
+ ///
+ public string Content { get; set; } = null!;
+
+ ///
+ /// Optional content type(mime type) of the source.
+ ///
+ [Optional]
+ public string? MimeType { get; set; }
+ }
+ }
+
+ namespace Models
+ {
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/StackTraceFeature.cs b/src/Dap.Protocol/Feature/Requests/StackTraceFeature.cs
new file mode 100644
index 000000000..eb74f806a
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/StackTraceFeature.cs
@@ -0,0 +1,113 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.StackTrace, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class StackTraceArguments : IRequest
+ {
+ ///
+ /// Retrieve the stacktrace for this thread.
+ ///
+ public long ThreadId { get; set; }
+
+ ///
+ /// The index of the first frame to return; if omitted frames start at 0.
+ ///
+ [Optional]
+ public long? StartFrame { get; set; }
+
+ ///
+ /// The maximum number of frames to return. If levels is not specified or 0, all frames are returned.
+ ///
+ [Optional]
+ public long? Levels { get; set; }
+
+ ///
+ /// Specifies details on how to format the stack frames.
+ ///
+ [Optional]
+ public StackFrameFormat? Format { get; set; }
+ }
+
+ public class StackTraceResponse
+ {
+ ///
+ /// The frames of the stackframe.If the array has length zero, there are no stackframes available.
+ /// This means that there is no location information available.
+ ///
+ public Container? StackFrames { get; set; }
+
+ ///
+ /// The total number of frames available.
+ ///
+ [Optional]
+ public long? TotalFrames { get; set; }
+ }
+ }
+
+ namespace Models
+ {
+ ///
+ /// Provides formatting information for a stack frame.
+ ///
+ public class StackFrameFormat : ValueFormat
+ {
+ ///
+ /// Displays parameters for the stack frame.
+ ///
+ [Optional]
+ public bool Parameters { get; set; }
+
+ ///
+ /// Displays the types of parameters for the stack frame.
+ ///
+ [Optional]
+ public bool ParameterTypes { get; set; }
+
+ ///
+ /// Displays the names of parameters for the stack frame.
+ ///
+ [Optional]
+ public bool ParameterNames { get; set; }
+
+ ///
+ /// Displays the values of parameters for the stack frame.
+ ///
+ [Optional]
+ public bool ParameterValues { get; set; }
+
+ ///
+ /// Displays the line long of the stack frame.
+ ///
+ [Optional]
+ public bool Line { get; set; }
+
+ ///
+ /// Displays the module of the stack frame.
+ ///
+ [Optional]
+ public bool Module { get; set; }
+
+ ///
+ /// Includes all stack frames, including those the debug adapter might otherwise hide.
+ ///
+ [Optional]
+ public bool IncludeAll { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/StepBackFeature.cs b/src/Dap.Protocol/Feature/Requests/StepBackFeature.cs
new file mode 100644
index 000000000..0cfb45e01
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/StepBackFeature.cs
@@ -0,0 +1,43 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.StepBack, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class StepBackArguments : IRequest
+ {
+ ///
+ /// Execute 'stepBack' for this thread.
+ ///
+ public long ThreadId { get; set; }
+
+ ///
+ /// Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.
+ ///
+ [Optional]
+ public SteppingGranularity? Granularity { get; set; }
+ }
+
+ public class StepBackResponse
+ {
+ }
+ }
+
+ namespace Models
+ {
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/StepInFeature.cs b/src/Dap.Protocol/Feature/Requests/StepInFeature.cs
new file mode 100644
index 000000000..3fde7e64a
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/StepInFeature.cs
@@ -0,0 +1,49 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.StepIn, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class StepInArguments : IRequest
+ {
+ ///
+ /// Execute 'stepIn' for this thread.
+ ///
+ public long ThreadId { get; set; }
+
+ ///
+ /// Optional id of the target to step into.
+ ///
+ [Optional]
+ public long? TargetId { get; set; }
+
+ ///
+ /// Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.
+ ///
+ [Optional]
+ public SteppingGranularity? Granularity { get; set; }
+ }
+
+ public class StepInResponse
+ {
+ }
+ }
+
+ namespace Models
+ {
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/StepInTargetsFeature.cs b/src/Dap.Protocol/Feature/Requests/StepInTargetsFeature.cs
new file mode 100644
index 000000000..c355cc4f0
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/StepInTargetsFeature.cs
@@ -0,0 +1,55 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.StepInTargets, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class StepInTargetsArguments : IRequest
+ {
+ ///
+ /// The stack frame for which to retrieve the possible stepIn targets.
+ ///
+ public long FrameId { get; set; }
+ }
+
+ public class StepInTargetsResponse
+ {
+ ///
+ /// The possible stepIn targets of the specified source location.
+ ///
+ public Container? Targets { get; set; }
+ }
+ }
+
+ namespace Models
+ {
+ ///
+ /// A StepInTarget can be used in the ‘stepIn’ request and determines into which single target the stepIn request should step.
+ ///
+ public class StepInTarget
+ {
+ ///
+ /// Unique identifier for a stepIn target.
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// The name of the stepIn target (shown in the UI).
+ ///
+ public string Label { get; set; } = null!;
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/StepOutFeature.cs b/src/Dap.Protocol/Feature/Requests/StepOutFeature.cs
new file mode 100644
index 000000000..1ee5f97a5
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/StepOutFeature.cs
@@ -0,0 +1,43 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.StepOut, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class StepOutArguments : IRequest
+ {
+ ///
+ /// Execute 'stepOut' for this thread.
+ ///
+ public long ThreadId { get; set; }
+
+ ///
+ /// Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.
+ ///
+ [Optional]
+ public SteppingGranularity? Granularity { get; set; }
+ }
+
+ public class StepOutResponse
+ {
+ }
+ }
+
+ namespace Models
+ {
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/TerminateFeature.cs b/src/Dap.Protocol/Feature/Requests/TerminateFeature.cs
new file mode 100644
index 000000000..f7cc7104f
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/TerminateFeature.cs
@@ -0,0 +1,37 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Terminate, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class TerminateArguments : IRequest
+ {
+ ///
+ /// A value of true indicates that this 'terminate' request is part of a restart sequence.
+ ///
+ [Optional]
+ public bool Restart { get; set; }
+ }
+
+ public class TerminateResponse
+ {
+ }
+ }
+
+ namespace Models
+ {
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/TerminateThreadsFeature.cs b/src/Dap.Protocol/Feature/Requests/TerminateThreadsFeature.cs
new file mode 100644
index 000000000..0fd5ac93b
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/TerminateThreadsFeature.cs
@@ -0,0 +1,38 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.TerminateThreads, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class TerminateThreadsArguments : IRequest
+ {
+ ///
+ /// Ids of threads to be terminated.
+ ///
+ [Optional]
+ public Container? ThreadIds { get; set; }
+ }
+
+ public class TerminateThreadsResponse
+ {
+ }
+ }
+
+ namespace Models
+ {
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/ThreadsFeature.cs b/src/Dap.Protocol/Feature/Requests/ThreadsFeature.cs
new file mode 100644
index 000000000..5ae913f34
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/ThreadsFeature.cs
@@ -0,0 +1,32 @@
+using System.Threading.Tasks;
+using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+using Thread = System.Threading.Thread;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Threads, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class ThreadsArguments : IRequest
+ {
+ }
+
+ public class ThreadsResponse
+ {
+ ///
+ /// All threads.
+ ///
+ public Container? Threads { get; set; }
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Feature/Requests/VariablesFeature.cs b/src/Dap.Protocol/Feature/Requests/VariablesFeature.cs
new file mode 100644
index 000000000..baad55a7a
--- /dev/null
+++ b/src/Dap.Protocol/Feature/Requests/VariablesFeature.cs
@@ -0,0 +1,69 @@
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
+using OmniSharp.Extensions.JsonRpc;
+using OmniSharp.Extensions.JsonRpc.Generation;
+
+// ReSharper disable once CheckNamespace
+namespace OmniSharp.Extensions.DebugAdapter.Protocol
+{
+ namespace Requests
+ {
+ [Parallel]
+ [Method(RequestNames.Variables, Direction.ClientToServer)]
+ [
+ GenerateHandler,
+ GenerateHandlerMethods,
+ GenerateRequestMethods
+ ]
+ public class VariablesArguments : IRequest
+ {
+ ///
+ /// The Variable reference.
+ ///
+ public long VariablesReference { get; set; }
+
+ ///
+ /// Optional filter to limit the child variables to either named or indexed.If ommited, both types are fetched.
+ ///
+ [Optional]
+ public VariablesArgumentsFilter? Filter { get; set; }
+
+ ///
+ /// The index of the first variable to return; if omitted children start at 0.
+ ///
+ [Optional]
+ public long? Start { get; set; }
+
+ ///
+ /// The number of variables to return. If count is missing or 0, all variables are returned.
+ ///
+ [Optional]
+ public long? Count { get; set; }
+
+ ///
+ /// Specifies details on how to format the Variable values.
+ ///
+ [Optional]
+ public ValueFormat? Format { get; set; }
+ }
+
+ public class VariablesResponse
+ {
+ ///
+ /// All(or a range) of variables for the given variable reference.
+ ///
+ public Container? Variables { get; set; }
+ }
+
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum VariablesArgumentsFilter
+ {
+ Indexed, Named
+ }
+ }
+}
diff --git a/src/Dap.Protocol/Models/Breakpoint.cs b/src/Dap.Protocol/Models/Breakpoint.cs
deleted file mode 100644
index 04022e9bb..000000000
--- a/src/Dap.Protocol/Models/Breakpoint.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// Information about a Breakpoint created in setBreakpoints or setFunctionBreakpoints.
- ///
- public class Breakpoint
- {
- ///
- /// An optional identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints.
- ///
- [Optional]
- public long? Id { get; set; }
-
- ///
- /// If true breakpoint could be set (but not necessarily at the desired location).
- ///
- public bool Verified { get; set; }
-
- ///
- /// 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.
- ///
- [Optional]
- public string? Message { get; set; }
-
- ///
- /// The source where the breakpoint is located.
- ///
- [Optional]
- public Source? Source { get; set; }
-
- ///
- /// The start line of the actual range covered by the breakpoint.
- ///
- [Optional]
- public int? Line { get; set; }
-
- ///
- /// An optional start column of the actual range covered by the breakpoint.
- ///
- [Optional]
- public int? Column { get; set; }
-
- ///
- /// An optional end line of the actual range covered by the breakpoint.
- ///
- [Optional]
- public int? EndLine { get; set; }
-
- ///
- /// An optional end column of the actual range covered by the breakpoint. If no end line is given, then the end column is assumed to be in the start line.
- ///
- [Optional]
- public int? EndColumn { get; set; }
-
- ///
- /// An optional memory reference to where the breakpoint is set.
- ///
- [Optional]
- public string? InstructionReference { get; set; }
-
- ///
- /// An optional offset from the instruction reference.
- /// This can be negative.
- ///
- [Optional]
- public int? Offset { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/BreakpointLocation.cs b/src/Dap.Protocol/Models/BreakpointLocation.cs
deleted file mode 100644
index ef362e811..000000000
--- a/src/Dap.Protocol/Models/BreakpointLocation.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- public class BreakpointLocation
- {
- ///
- /// Start line of breakpoint location.
- ///
- public int Line { get; set; }
-
- ///
- /// Optional start column of breakpoint location.
- ///
- [Optional]
- public int? Column { get; set; }
-
- ///
- /// Optional end line of breakpoint location if the location covers a range.
- ///
- [Optional]
- public int? EndLine { get; set; }
-
- ///
- /// Optional end column of breakpoint location if the location covers a range.
- ///
- [Optional]
- public int? EndColumn { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/Capabilities.cs b/src/Dap.Protocol/Models/Capabilities.cs
deleted file mode 100644
index 5a35c1ce4..000000000
--- a/src/Dap.Protocol/Models/Capabilities.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// Information about the capabilities of a debug adapter.
- ///
- public class Capabilities
- {
- ///
- /// The debug adapter supports the 'configurationDone' request.
- ///
- [Optional]
- public bool SupportsConfigurationDoneRequest { get; set; }
-
- ///
- /// The debug adapter supports function breakpoints.
- ///
- [Optional]
- public bool SupportsFunctionBreakpoints { get; set; }
-
- ///
- /// The debug adapter supports conditional breakpoints.
- ///
- [Optional]
- public bool SupportsConditionalBreakpoints { get; set; }
-
- ///
- /// The debug adapter supports breakpoints that break execution after a specified long of hits.
- ///
- [Optional]
- public bool SupportsHitConditionalBreakpoints { get; set; }
-
- ///
- /// The debug adapter supports a (side effect free) evaluate request for data hovers.
- ///
- [Optional]
- public bool SupportsEvaluateForHovers { get; set; }
-
- ///
- /// Available filters or options for the setExceptionBreakpoints request.
- ///
- [Optional]
- public Container? ExceptionBreakpointFilters { get; set; }
-
- ///
- /// The debug adapter supports stepping back via the 'stepBack' and 'reverseContinue' requests.
- ///
- [Optional]
- public bool SupportsStepBack { get; set; }
-
- ///
- /// The debug adapter supports setting a variable to a value.
- ///
- [Optional]
- public bool SupportsSetVariable { get; set; }
-
- ///
- /// The debug adapter supports restarting a frame.
- ///
- [Optional]
- public bool SupportsRestartFrame { get; set; }
-
- ///
- /// The debug adapter supports the 'gotoTargets' request.
- ///
- [Optional]
- public bool SupportsGotoTargetsRequest { get; set; }
-
- ///
- /// The debug adapter supports the 'stepInTargets' request.
- ///
- [Optional]
- public bool SupportsStepInTargetsRequest { get; set; }
-
- ///
- /// The debug adapter supports the 'completions' request.
- ///
- [Optional]
- public bool SupportsCompletionsRequest { get; set; }
-
- ///
- /// The debug adapter supports the 'modules' request.
- ///
- [Optional]
- public bool SupportsModulesRequest { get; set; }
-
- ///
- /// The set of additional module information exposed by the debug adapter.
- ///
- [Optional]
- public Container? AdditionalModuleColumns { get; set; }
-
- ///
- /// Checksum algorithms supported by the debug adapter.
- ///
- [Optional]
- public Container? SupportedChecksumAlgorithms { get; set; }
-
- ///
- /// The debug adapter supports the 'restart' request. In this case a client should not implement 'restart' by terminating and relaunching the adapter but by calling the
- /// RestartRequest.
- ///
- [Optional]
- public bool SupportsRestartRequest { get; set; }
-
- ///
- /// The debug adapter supports 'exceptionOptions' on the setExceptionBreakpoints request.
- ///
- [Optional]
- public bool SupportsExceptionOptions { get; set; }
-
- ///
- /// The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest.
- ///
- [Optional]
- public bool SupportsValueFormattingOptions { get; set; }
-
- ///
- /// The debug adapter supports the 'exceptionInfo' request.
- ///
- [Optional]
- public bool SupportsExceptionInfoRequest { get; set; }
-
- ///
- /// The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request.
- ///
- [Optional]
- public bool SupportTerminateDebuggee { get; set; }
-
- ///
- /// The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the
- /// 'StackTrace' request are supported.
- ///
- [Optional]
- public bool SupportsDelayedStackTraceLoading { get; set; }
-
- ///
- /// The debug adapter supports the 'loadedSources' request.
- ///
- [Optional]
- public bool SupportsLoadedSourcesRequest { get; set; }
-
- ///
- /// The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint.
- ///
- [Optional]
- public bool SupportsLogPoints { get; set; }
-
- ///
- /// The debug adapter supports the 'terminateThreads' request.
- ///
- [Optional]
- public bool SupportsTerminateThreadsRequest { get; set; }
-
- ///
- /// The debug adapter supports the 'setExpression' request.
- ///
- [Optional]
- public bool SupportsSetExpression { get; set; }
-
- ///
- /// The debug adapter supports the 'terminate' request.
- ///
- [Optional]
- public bool SupportsTerminateRequest { get; set; }
-
- ///
- /// The debug adapter supports data breakpoints.
- ///
- [Optional]
- public bool SupportsDataBreakpoints { get; set; }
-
- ///
- /// The debug adapter supports the 'readMemory' request.
- ///
- [Optional]
- public bool SupportsReadMemoryRequest { get; set; }
-
- ///
- /// The debug adapter supports the 'disassemble' request.
- ///
- [Optional]
- public bool SupportsDisassembleRequest { get; set; }
-
- ///
- /// The debug adapter supports the 'cancel' request.
- ///
- [Optional]
- public bool SupportsCancelRequest { get; set; }
-
- ///
- /// The debug adapter supports the 'breakpointLocations' request.
- ///
- [Optional]
- public bool SupportsBreakpointLocationsRequest { get; set; }
-
- ///
- /// The debug adapter supports the 'clipboard' context value in the 'evaluate' request.
- ///
- [Optional]
- public bool SupportsClipboardContext { get; set; }
-
- ///
- /// The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests.
- ///
- [Optional]
- public bool SupportsSteppingGranularity { get; set; }
-
- ///
- /// The debug adapter supports adding breakpoints based on instruction references.
- ///
- [Optional]
- public bool SupportsInstructionBreakpoints { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/CompletionItem.cs b/src/Dap.Protocol/Models/CompletionItem.cs
deleted file mode 100644
index 2133deb00..000000000
--- a/src/Dap.Protocol/Models/CompletionItem.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// CompletionItems are the suggestions returned from the CompletionsRequest.
- ///
- public class CompletionItem
- {
- ///
- /// The label of this completion item. By default this is also the text that is inserted when selecting this completion.
- ///
- public string Label { get; set; } = null!;
-
- ///
- /// If text is not falsy then it is inserted instead of the label.
- ///
- [Optional]
- public string? Text { get; set; } = null!;
-
- ///
- /// The item's type. Typically the client uses this information to render the item in the UI with an icon.
- ///
- [Optional]
- public CompletionItemType Type { get; set; }
-
- ///
- /// This value determines the location (in the CompletionsRequest's 'text' attribute) where the completion text is added.
- /// If missing the text is added at the location specified by the CompletionsRequest's 'column' attribute.
- ///
- [Optional]
- public int? Start { get; set; }
-
- ///
- /// This value determines how many characters are overwritten by the completion text.
- /// If missing the value 0 is assumed which results in the completion text being inserted.
- ///
- [Optional]
- public int? Length { get; set; }
-
- ///
- /// Determines the start of the new selection after the text has been inserted (or replaced).
- /// The start position must in the range 0 and length of the completion text.
- /// If omitted the selection starts at the end of the completion text.
- ///
- [Optional]
- public int? SelectionStart { get; set; }
-
- ///
- /// Determines the length of the new selection after the text has been inserted (or replaced).
- /// The selection can not extend beyond the bounds of the completion text.
- /// If omitted the length is assumed to be 0.
- ///
- [Optional]
- public int? SelectionLength { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/CompletionItemType.cs b/src/Dap.Protocol/Models/CompletionItemType.cs
deleted file mode 100644
index dd6412356..000000000
--- a/src/Dap.Protocol/Models/CompletionItemType.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// Some predefined types for the CompletionItem.Please note that not all clients have specific icons for all of them.
- ///
- [JsonConverter(typeof(StringEnumConverter))]
- public enum CompletionItemType
- {
- Method, Function, Constructor, Field, Variable, Class, Interface, Module, Property, Unit, Value, Enum, Keyword, Snippet, Text, Color, File, Reference, CustomColor
- }
-}
diff --git a/src/Dap.Protocol/Models/DisassembledInstruction.cs b/src/Dap.Protocol/Models/DisassembledInstruction.cs
deleted file mode 100644
index f19e08667..000000000
--- a/src/Dap.Protocol/Models/DisassembledInstruction.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// DisassembledInstruction
- /// Represents a single disassembled instruction.
- ///
- public class DisassembledInstruction
- {
- ///
- /// The address of the instruction. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise.
- ///
- public string Address { get; set; } = null!;
-
- ///
- /// Optional raw bytes representing the instruction and its operands, in an implementation-defined format.
- ///
- [Optional]
- public string? InstructionBytes { get; set; }
-
- ///
- /// Text representing the instruction and its operands, in an implementation-defined format.
- ///
- public string Instruction { get; set; } = null!;
-
- ///
- /// Name of the symbol that correponds with the location of this instruction, if any.
- ///
- [Optional]
- public string? Symbol { get; set; }
-
- ///
- /// Source location that corresponds to this instruction, if any. Should always be set (if available) on the first instruction returned, but can be omitted afterwards if this
- /// instruction maps to the same source file as the previous instruction.
- ///
- [Optional]
- public Source? Location { get; set; }
-
- ///
- /// The line within the source location that corresponds to this instruction, if any.
- ///
- [Optional]
- public int? Line { get; set; }
-
- ///
- /// The column within the line that corresponds to this instruction, if any.
- ///
- [Optional]
- public int? Column { get; set; }
-
- ///
- /// The end line of the range that corresponds to this instruction, if any.
- ///
- [Optional]
- public int? EndLine { get; set; }
-
- ///
- /// The end column of the range that corresponds to this instruction, if any.
- ///
- [Optional]
- public int? EndColumn { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/ExceptionBreakMode.cs b/src/Dap.Protocol/Models/ExceptionBreakMode.cs
deleted file mode 100644
index b2138d2a8..000000000
--- a/src/Dap.Protocol/Models/ExceptionBreakMode.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// This enumeration defines all possible conditions when a thrown exception should result in a break.
- /// never: never breaks,
- /// always: always breaks,
- /// unhandled: breaks when excpetion unhandled,
- /// userUnhandled: breaks if the exception is not handled by user code.
- ///
- [JsonConverter(typeof(StringEnumConverter))]
- public enum ExceptionBreakMode
- {
- Never, Always, Unhandled, UserUnhandled
- }
-}
diff --git a/src/Dap.Protocol/Models/ExceptionOptions.cs b/src/Dap.Protocol/Models/ExceptionOptions.cs
deleted file mode 100644
index 4a8b21247..000000000
--- a/src/Dap.Protocol/Models/ExceptionOptions.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// ExceptionOptions
- /// An ExceptionOptions assigns configuration options to a set of exceptions.
- ///
- public class ExceptionOptions
- {
- ///
- /// A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected. By convention the first segment of the path is a category that is
- /// used to group exceptions in the UI.
- ///
- [Optional]
- public Container? Path { get; set; }
-
- ///
- /// Condition when a thrown exception should result in a break.
- ///
- public ExceptionBreakMode BreakMode { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/ExceptionPathSegment.cs b/src/Dap.Protocol/Models/ExceptionPathSegment.cs
deleted file mode 100644
index 545ae94dc..000000000
--- a/src/Dap.Protocol/Models/ExceptionPathSegment.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// An ExceptionPathSegment represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.If a segment consists of more than one name, it matches the
- /// names provided if ‘negate’ is false or missing or it matches anything except the names provided if ‘negate’ is true.
- ///
- public class ExceptionPathSegment
- {
- ///
- /// If false or missing this segment matches the names provided, otherwise it matches anything except the names provided.
- ///
- [Optional]
- public bool Negate { get; set; }
-
- ///
- /// Depending on the value of 'negate' the names that should match or not match.
- ///
- public Container Names { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Models/FunctionBreakpoint.cs b/src/Dap.Protocol/Models/FunctionBreakpoint.cs
deleted file mode 100644
index 9805bdb61..000000000
--- a/src/Dap.Protocol/Models/FunctionBreakpoint.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// FunctionBreakpoint
- /// Properties of a breakpoint passed to the setFunctionBreakpoints request.
- ///
- public class FunctionBreakpoint
- {
- ///
- /// The name of the function.
- ///
- public string Name { get; set; } = null!;
-
- ///
- /// An optional expression for conditional breakpoints.
- ///
- [Optional]
- public string? Condition { get; set; }
-
- ///
- /// An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed.
- ///
- [Optional]
- public string? HitCondition { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/GotoTarget.cs b/src/Dap.Protocol/Models/GotoTarget.cs
deleted file mode 100644
index 35ab6c0bf..000000000
--- a/src/Dap.Protocol/Models/GotoTarget.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// A GotoTarget describes a code location that can be used as a target in the ‘goto’ request.
- /// The possible goto targets can be determined via the ‘gotoTargets’ request.
- ///
- public class GotoTarget
- {
- ///
- /// Unique identifier for a goto target. This is used in the goto request.
- ///
- public long Id { get; set; }
-
- ///
- /// The name of the goto target (shown in the UI).
- ///
- public string Label { get; set; } = null!;
-
- ///
- /// The line of the goto target.
- ///
- public int Line { get; set; }
-
- ///
- /// An optional column of the goto target.
- ///
- [Optional]
- public int? Column { get; set; }
-
- ///
- /// An optional end line of the range covered by the goto target.
- ///
- [Optional]
- public int? EndLine { get; set; }
-
- ///
- /// An optional end column of the range covered by the goto target.
- ///
- [Optional]
- public int? EndColumn { get; set; }
-
- ///
- /// Optional memory reference for the instruction pointer value represented by this target.
- ///
- [Optional]
- public string? InstructionPointerReference { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/Scope.cs b/src/Dap.Protocol/Models/Scope.cs
deleted file mode 100644
index d6f7af1ee..000000000
--- a/src/Dap.Protocol/Models/Scope.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// A Scope is a named container for variables.Optionally a scope can map to a source or a range within a source.
- ///
- public class Scope
- {
- ///
- /// Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated.
- ///
- public string Name { get; set; } = null!;
-
- ///
- /// An optional hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.
- /// Values:
- /// 'arguments': Scope contains method arguments.
- /// 'locals': Scope contains local variables.
- /// 'registers': Scope contains registers. Only a single 'registers' scope should be returned from a 'scopes' request.
- /// etc.
- ///
- [Optional]
- public string? PresentationHint { get; set; }
-
- ///
- /// The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest.
- ///
- public long VariablesReference { get; set; }
-
- ///
- /// The long of named variables in this scope.
- /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
- ///
- [Optional]
- public long? NamedVariables { get; set; }
-
- ///
- /// The long of indexed variables in this scope.
- /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
- ///
- [Optional]
- public long? IndexedVariables { get; set; }
-
- ///
- /// If true, the long of variables in this scope is large or expensive to retrieve.
- ///
- public bool Expensive { get; set; }
-
- ///
- /// Optional source for this scope.
- ///
- [Optional]
- public Source? Source { get; set; }
-
- ///
- /// Optional start line of the range covered by this scope.
- ///
- [Optional]
- public int? Line { get; set; }
-
- ///
- /// Optional start column of the range covered by this scope.
- ///
- [Optional]
- public int? Column { get; set; }
-
- ///
- /// Optional end line of the range covered by this scope.
- ///
- [Optional]
- public int? EndLine { get; set; }
-
- ///
- /// Optional end column of the range covered by this scope.
- ///
- [Optional]
- public int? EndColumn { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/StackFrameFormat.cs b/src/Dap.Protocol/Models/StackFrameFormat.cs
deleted file mode 100644
index 7280a8363..000000000
--- a/src/Dap.Protocol/Models/StackFrameFormat.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// Provides formatting information for a stack frame.
- ///
- public class StackFrameFormat : ValueFormat
- {
- ///
- /// Displays parameters for the stack frame.
- ///
- [Optional]
- public bool Parameters { get; set; }
-
- ///
- /// Displays the types of parameters for the stack frame.
- ///
- [Optional]
- public bool ParameterTypes { get; set; }
-
- ///
- /// Displays the names of parameters for the stack frame.
- ///
- [Optional]
- public bool ParameterNames { get; set; }
-
- ///
- /// Displays the values of parameters for the stack frame.
- ///
- [Optional]
- public bool ParameterValues { get; set; }
-
- ///
- /// Displays the line long of the stack frame.
- ///
- [Optional]
- public bool Line { get; set; }
-
- ///
- /// Displays the module of the stack frame.
- ///
- [Optional]
- public bool Module { get; set; }
-
- ///
- /// Includes all stack frames, including those the debug adapter might otherwise hide.
- ///
- [Optional]
- public bool IncludeAll { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Models/StepInTarget.cs b/src/Dap.Protocol/Models/StepInTarget.cs
deleted file mode 100644
index 762d814df..000000000
--- a/src/Dap.Protocol/Models/StepInTarget.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Models
-{
- ///
- /// A StepInTarget can be used in the ‘stepIn’ request and determines into which single target the stepIn request should step.
- ///
- public class StepInTarget
- {
- ///
- /// Unique identifier for a stepIn target.
- ///
- public long Id { get; set; }
-
- ///
- /// The name of the stepIn target (shown in the UI).
- ///
- public string Label { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/AttachRequestArguments.cs b/src/Dap.Protocol/Requests/AttachRequestArguments.cs
deleted file mode 100644
index 08e785e96..000000000
--- a/src/Dap.Protocol/Requests/AttachRequestArguments.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Collections.Generic;
-using MediatR;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Attach, Direction.ClientToServer)]
- public class AttachRequestArguments : IRequest
- {
- ///
- /// Optional data from the previous, restarted session.
- /// The data is sent as the 'restart' attribute of the 'terminated' event.
- /// The client should leave the data intact.
- ///
- [Optional]
- [JsonProperty(PropertyName = "__restart")]
- public JToken? Restart { get; set; }
-
- [JsonExtensionData] public IDictionary ExtensionData { get; set; } = new Dictionary();
- }
-}
diff --git a/src/Dap.Protocol/Requests/AttachResponse.cs b/src/Dap.Protocol/Requests/AttachResponse.cs
deleted file mode 100644
index 06339ab55..000000000
--- a/src/Dap.Protocol/Requests/AttachResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class AttachResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/BreakpointLocationsArguments.cs b/src/Dap.Protocol/Requests/BreakpointLocationsArguments.cs
deleted file mode 100644
index 585d90402..000000000
--- a/src/Dap.Protocol/Requests/BreakpointLocationsArguments.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.BreakpointLocations, Direction.ClientToServer)]
- public class BreakpointLocationsArguments : IRequest
- {
- ///
- /// The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified.
- ///
- public Source Source { get; set; } = null!;
-
- ///
- /// Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.
- ///
- public int Line { get; set; }
-
- ///
- /// Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed.
- ///
- [Optional]
- public int? Column { get; set; }
-
- ///
- /// Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line.
- ///
- [Optional]
- public int? EndLine { get; set; }
-
- ///
- /// Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line.
- ///
- [Optional]
- public int? EndColumn { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/BreakpointLocationsResponse.cs b/src/Dap.Protocol/Requests/BreakpointLocationsResponse.cs
deleted file mode 100644
index 9e03d80fd..000000000
--- a/src/Dap.Protocol/Requests/BreakpointLocationsResponse.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class BreakpointLocationsResponse
- {
- ///
- /// Sorted set of possible breakpoint locations.
- ///
- public Container Breakpoints { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/CancelArguments.cs b/src/Dap.Protocol/Requests/CancelArguments.cs
deleted file mode 100644
index ba7bf2fe9..000000000
--- a/src/Dap.Protocol/Requests/CancelArguments.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- ///
- /// DAP is kind of silly....
- /// Cancellation is for requests and progress tokens... hopefully if isn't ever expanded any further... because that would be fun.
- ///
- [Method(RequestNames.Cancel, Direction.ClientToServer)]
- public class CancelArguments : IRequest
- {
- // This is removed on purpose, as request cancellation is handled by the DapReciever
- // ///
- // /// The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.
- // /// Both a 'requestId' and a 'progressId' can be specified in one request.
- // ///
- // [Optional]
- // public int? RequestId { get; set; }
-
- ///
- /// The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.
- /// Both a 'requestId' and a 'progressId' can be specified in one request.
- ///
- [Optional]
- public ProgressToken? ProgressId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/CancelResponse.cs b/src/Dap.Protocol/Requests/CancelResponse.cs
deleted file mode 100644
index e6e2c40ae..000000000
--- a/src/Dap.Protocol/Requests/CancelResponse.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class CancelResponse
- {
- ///
- /// The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.
- /// Both a 'requestId' and a 'progressId' can be specified in one request.
- ///
- [Optional]
- public int? RequestId { get; set; }
-
- ///
- /// The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.
- /// Both a 'requestId' and a 'progressId' can be specified in one request.
- ///
- [Optional]
- public ProgressToken? ProgressId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/CompletionsArguments.cs b/src/Dap.Protocol/Requests/CompletionsArguments.cs
deleted file mode 100644
index 9a589b895..000000000
--- a/src/Dap.Protocol/Requests/CompletionsArguments.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Completions, Direction.ClientToServer)]
- public class CompletionsArguments : IRequest
- {
- ///
- /// Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope.
- ///
- [Optional]
- public long? FrameId { get; set; }
-
- ///
- /// One or more source lines.Typically this is the text a user has typed into the debug console before he asked for completion.
- ///
- public string Text { get; set; } = null!;
-
- ///
- /// The character position for which to determine the completion proposals.
- ///
- public long Column { get; set; }
-
- ///
- /// An optional line for which to determine the completion proposals.If missing the first line of the text is assumed.
- ///
- [Optional]
- public long? Line { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/CompletionsResponse.cs b/src/Dap.Protocol/Requests/CompletionsResponse.cs
deleted file mode 100644
index 0c1594f7b..000000000
--- a/src/Dap.Protocol/Requests/CompletionsResponse.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class CompletionsResponse
- {
- ///
- /// The possible completions for .
- ///
- public Container Targets { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/ConfigurationDoneArguments.cs b/src/Dap.Protocol/Requests/ConfigurationDoneArguments.cs
deleted file mode 100644
index 2c367764d..000000000
--- a/src/Dap.Protocol/Requests/ConfigurationDoneArguments.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.ConfigurationDone, Direction.ClientToServer)]
- public class ConfigurationDoneArguments : IRequest
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/ConfigurationDoneResponse.cs b/src/Dap.Protocol/Requests/ConfigurationDoneResponse.cs
deleted file mode 100644
index 341cfa8a9..000000000
--- a/src/Dap.Protocol/Requests/ConfigurationDoneResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class ConfigurationDoneResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/ContinueArguments.cs b/src/Dap.Protocol/Requests/ContinueArguments.cs
deleted file mode 100644
index eaa283a7f..000000000
--- a/src/Dap.Protocol/Requests/ContinueArguments.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Continue, Direction.ClientToServer)]
- public class ContinueArguments : IRequest
- {
- ///
- /// Continue execution for the specified thread(if possible). If the backend cannot continue on a single thread but will continue on all threads, it should set the
- /// 'allThreadsContinued' attribute in the response to true.
- ///
- public long ThreadId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/ContinueResponse.cs b/src/Dap.Protocol/Requests/ContinueResponse.cs
deleted file mode 100644
index 3334bfaf8..000000000
--- a/src/Dap.Protocol/Requests/ContinueResponse.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class ContinueResponse
- {
- ///
- /// If true, the 'continue' request has ignored the specified thread and continued all threads instead.If this attribute is missing a value of 'true' is assumed for backward
- /// compatibility.
- ///
- [Optional]
- public bool AllThreadsContinued { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/DataBreakpointInfoArguments.cs b/src/Dap.Protocol/Requests/DataBreakpointInfoArguments.cs
deleted file mode 100644
index aabe515dc..000000000
--- a/src/Dap.Protocol/Requests/DataBreakpointInfoArguments.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.DataBreakpointInfo, Direction.ClientToServer)]
- public class DataBreakpointInfoArguments : IRequest
- {
- ///
- /// Reference to the Variable container if the data breakpoint is requested for a child of the container.
- ///
- [Optional]
- public long? VariablesReference { get; set; }
-
- ///
- /// The name of the Variable's child to obtain data breakpoint information for. If variableReference isn’t provided, this can be an expression.
- ///
- public string Name { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/DataBreakpointInfoResponse.cs b/src/Dap.Protocol/Requests/DataBreakpointInfoResponse.cs
deleted file mode 100644
index 86eaa0283..000000000
--- a/src/Dap.Protocol/Requests/DataBreakpointInfoResponse.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class DataBreakpointInfoResponse
- {
- ///
- /// An identifier for the data on which a data breakpoint can be registered with the setDataBreakpoints request or null if no data breakpoint is available.
- ///
- public string DataId { get; set; } = null!;
-
- ///
- /// UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available.
- ///
- public string Description { get; set; } = null!;
-
- ///
- /// Optional attribute listing the available access types for a potential data breakpoint.A UI frontend could surface this information.
- ///
- [Optional]
- public Container? AccessTypes { get; set; }
-
- ///
- /// Optional attribute indicating that a potential data breakpoint could be persisted across sessions.
- ///
- [Optional]
- public bool CanPersist { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/DisassembleArguments.cs b/src/Dap.Protocol/Requests/DisassembleArguments.cs
deleted file mode 100644
index 44a5ee484..000000000
--- a/src/Dap.Protocol/Requests/DisassembleArguments.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Disassemble, Direction.ClientToServer)]
- public class DisassembleArguments : IRequest
- {
- ///
- /// Memory reference to the base location containing the instructions to disassemble.
- ///
- public string MemoryReference { get; set; } = null!;
-
- ///
- /// Optional offset(in bytes) to be applied to the reference location before disassembling.Can be negative.
- ///
- [Optional]
- public long? Offset { get; set; }
-
- ///
- /// Optional offset(in instructions) to be applied after the byte offset(if any) before disassembling.Can be negative.
- ///
-
- [Optional]
- public long? InstructionOffset { get; set; }
-
- ///
- /// Number of instructions to disassemble starting at the specified location and offset.An adapter must return exactly this number of instructions - any unavailable instructions
- /// should be replaced with an implementation-defined 'invalid instruction' value.
- ///
- public long InstructionCount { get; set; }
-
- ///
- /// If true, the adapter should attempt to resolve memory addresses and other values to symbolic names.
- ///
- [Optional]
- public bool ResolveSymbols { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/DisassembleResponse.cs b/src/Dap.Protocol/Requests/DisassembleResponse.cs
deleted file mode 100644
index f81cdd8f5..000000000
--- a/src/Dap.Protocol/Requests/DisassembleResponse.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class DisassembleResponse
- {
- ///
- /// The list of disassembled instructions.
- ///
- public Container Instructions { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/DisconnectArguments.cs b/src/Dap.Protocol/Requests/DisconnectArguments.cs
deleted file mode 100644
index 98520e7d0..000000000
--- a/src/Dap.Protocol/Requests/DisconnectArguments.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Disconnect, Direction.ClientToServer)]
- public class DisconnectArguments : IRequest
- {
- ///
- /// A value of true indicates that this 'disconnect' request is part of a restart sequence.
- ///
- [Optional]
- public bool Restart { get; set; }
-
- ///
- /// Indicates whether the debuggee should be terminated when the debugger is disconnected.
- /// If unspecified, the debug adapter is free to do whatever it thinks is best.
- /// A client can only rely on this attribute being properly honored if a debug adapter returns true for the 'supportTerminateDebuggee' capability.
- ///
- [Optional]
- public bool TerminateDebuggee { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/DisconnectResponse.cs b/src/Dap.Protocol/Requests/DisconnectResponse.cs
deleted file mode 100644
index 2a58dee1d..000000000
--- a/src/Dap.Protocol/Requests/DisconnectResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class DisconnectResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/EvaluateArguments.cs b/src/Dap.Protocol/Requests/EvaluateArguments.cs
deleted file mode 100644
index 5f7ef0ce3..000000000
--- a/src/Dap.Protocol/Requests/EvaluateArguments.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Evaluate, Direction.ClientToServer)]
- public class EvaluateArguments : IRequest
- {
- ///
- /// The expression to evaluate.
- ///
- public string Expression { get; set; } = null!;
-
- ///
- /// Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope.
- ///
- [Optional]
- public long? FrameId { get; set; }
-
- ///
- /// The context in which the evaluate request is run.
- /// Values:
- /// 'watch': evaluate is run in a watch.
- /// 'repl': evaluate is run from REPL console.
- /// 'hover': evaluate is run from a data hover.
- /// etc.
- ///
- [Optional]
- public string? Context { get; set; }
-
- ///
- /// Specifies details on how to format the Evaluate result.
- ///
- [Optional]
- public ValueFormat? Format { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/EvaluateResponse.cs b/src/Dap.Protocol/Requests/EvaluateResponse.cs
deleted file mode 100644
index 30a3165a3..000000000
--- a/src/Dap.Protocol/Requests/EvaluateResponse.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class EvaluateResponse
- {
- ///
- /// The result of the evaluate request.
- ///
- public string Result { get; set; } = null!;
-
- ///
- /// The optional type of the evaluate result.
- ///
- [Optional]
- public string? Type { get; set; }
-
- ///
- /// Properties of a evaluate result that can be used to determine how to render the result in the UI.
- ///
- [Optional]
- public VariablePresentationHint? PresentationHint { get; set; }
-
- ///
- /// If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.
- ///
- public long VariablesReference { get; set; }
-
- ///
- /// The number of named child variables.
- /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
- ///
- [Optional]
- public long? NamedVariables { get; set; }
-
- ///
- /// The number of indexed child variables.
- /// The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
- ///
- [Optional]
- public long? IndexedVariables { get; set; }
-
- ///
- /// Memory reference to a location appropriate for this result.For pointer type eval results, this is generally a reference to the memory address contained in the pointer.
- ///
- [Optional]
- public string? MemoryReference { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/ExceptionInfoArguments.cs b/src/Dap.Protocol/Requests/ExceptionInfoArguments.cs
deleted file mode 100644
index 2b8c2818e..000000000
--- a/src/Dap.Protocol/Requests/ExceptionInfoArguments.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.ExceptionInfo, Direction.ClientToServer)]
- public class ExceptionInfoArguments : IRequest
- {
- ///
- /// Thread for which exception information should be retrieved.
- ///
- public long ThreadId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/ExceptionInfoResponse.cs b/src/Dap.Protocol/Requests/ExceptionInfoResponse.cs
deleted file mode 100644
index 85c56baec..000000000
--- a/src/Dap.Protocol/Requests/ExceptionInfoResponse.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class ExceptionInfoResponse
- {
- ///
- /// ID of the exception that was thrown.
- ///
- public string ExceptionId { get; set; } = null!;
-
- ///
- /// Descriptive text for the exception provided by the debug adapter.
- ///
- [Optional]
- public string? Description { get; set; }
-
- ///
- /// Mode that caused the exception notification to be raised.
- ///
- public ExceptionBreakMode BreakMode { get; set; }
-
- ///
- /// Detailed information about the exception.
- ///
- [Optional]
- public ExceptionDetails? Details { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/GotoArguments.cs b/src/Dap.Protocol/Requests/GotoArguments.cs
deleted file mode 100644
index 6475246de..000000000
--- a/src/Dap.Protocol/Requests/GotoArguments.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Goto, Direction.ClientToServer)]
- public class GotoArguments : IRequest
- {
- ///
- /// Set the goto target for this thread.
- ///
- public long ThreadId { get; set; }
-
- ///
- /// The location where the debuggee will continue to run.
- ///
- public long TargetId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/GotoResponse.cs b/src/Dap.Protocol/Requests/GotoResponse.cs
deleted file mode 100644
index 4faf9abf5..000000000
--- a/src/Dap.Protocol/Requests/GotoResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class GotoResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/GotoTargetsArguments.cs b/src/Dap.Protocol/Requests/GotoTargetsArguments.cs
deleted file mode 100644
index 424fea94b..000000000
--- a/src/Dap.Protocol/Requests/GotoTargetsArguments.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.GotoTargets, Direction.ClientToServer)]
- public class GotoTargetsArguments : IRequest
- {
- ///
- /// The source location for which the goto targets are determined.
- ///
- public Source Source { get; set; } = null!;
-
- ///
- /// The line location for which the goto targets are determined.
- ///
- public long Line { get; set; }
-
- ///
- /// An optional column location for which the goto targets are determined.
- ///
- [Optional]
- public long? Column { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/GotoTargetsResponse.cs b/src/Dap.Protocol/Requests/GotoTargetsResponse.cs
deleted file mode 100644
index 0852d5842..000000000
--- a/src/Dap.Protocol/Requests/GotoTargetsResponse.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class GotoTargetsResponse
- {
- ///
- /// The possible goto targets of the specified location.
- ///
- public Container Targets { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/IAttachHandler.cs b/src/Dap.Protocol/Requests/IAttachHandler.cs
deleted file mode 100644
index 07df0dba2..000000000
--- a/src/Dap.Protocol/Requests/IAttachHandler.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Attach, Direction.ClientToServer)]
- [GenerateHandlerMethods(AllowDerivedRequests = true)]
- [GenerateRequestMethods]
- public interface IAttachHandler : IJsonRpcRequestHandler where T : AttachRequestArguments
- {
- }
-
- public interface IAttachHandler : IAttachHandler
- {
- }
-
- public abstract class AttachHandlerBase : IAttachHandler where T : AttachRequestArguments
- {
- public abstract Task Handle(T request, CancellationToken cancellationToken);
- }
-
- public abstract class AttachHandler : AttachHandlerBase, IAttachHandler
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/IBreakpointLocationsHandler.cs b/src/Dap.Protocol/Requests/IBreakpointLocationsHandler.cs
deleted file mode 100644
index ad2d83d8a..000000000
--- a/src/Dap.Protocol/Requests/IBreakpointLocationsHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.BreakpointLocations, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IBreakpointLocationsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class BreakpointLocationsHandlerBase : IBreakpointLocationsHandler
- {
- public abstract Task Handle(BreakpointLocationsArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/ICancelHandler.cs b/src/Dap.Protocol/Requests/ICancelHandler.cs
deleted file mode 100644
index a90cf7eb0..000000000
--- a/src/Dap.Protocol/Requests/ICancelHandler.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- ///
- /// DAP is kind of silly....
- /// Cancellation is for requests and progress tokens... hopefully if isn't ever expanded any further... because that would be fun.
- ///
- [Parallel]
- [Method(RequestNames.Cancel, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ICancelHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class CancelHandlerBase : ICancelHandler
- {
- public abstract Task Handle(CancelArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/ICompletionsHandler.cs b/src/Dap.Protocol/Requests/ICompletionsHandler.cs
deleted file mode 100644
index ed6b41611..000000000
--- a/src/Dap.Protocol/Requests/ICompletionsHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Completions, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ICompletionsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class CompletionsHandler : ICompletionsHandler
- {
- public abstract Task Handle(CompletionsArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IConfigurationDoneHandler.cs b/src/Dap.Protocol/Requests/IConfigurationDoneHandler.cs
deleted file mode 100644
index e8c7cc1ee..000000000
--- a/src/Dap.Protocol/Requests/IConfigurationDoneHandler.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.ConfigurationDone, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface
- IConfigurationDoneHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class ConfigurationDoneHandler : IConfigurationDoneHandler
- {
- public abstract Task Handle(
- ConfigurationDoneArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IContinueHandler.cs b/src/Dap.Protocol/Requests/IContinueHandler.cs
deleted file mode 100644
index d610bbd8d..000000000
--- a/src/Dap.Protocol/Requests/IContinueHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Continue, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IContinueHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class ContinueHandler : IContinueHandler
- {
- public abstract Task Handle(ContinueArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IDataBreakpointInfoHandler.cs b/src/Dap.Protocol/Requests/IDataBreakpointInfoHandler.cs
deleted file mode 100644
index dddf32999..000000000
--- a/src/Dap.Protocol/Requests/IDataBreakpointInfoHandler.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.DataBreakpointInfo, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface
- IDataBreakpointInfoHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class DataBreakpointInfoHandler : IDataBreakpointInfoHandler
- {
- public abstract Task Handle(
- DataBreakpointInfoArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IDebugAdapterInitializeHandler.cs b/src/Dap.Protocol/Requests/IDebugAdapterInitializeHandler.cs
deleted file mode 100644
index eb5298540..000000000
--- a/src/Dap.Protocol/Requests/IDebugAdapterInitializeHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Initialize, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IDebugAdapterInitializeHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class DebugAdapterInitializeHandler : IDebugAdapterInitializeHandler
- {
- public abstract Task Handle(
- InitializeRequestArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IDisassembleHandler.cs b/src/Dap.Protocol/Requests/IDisassembleHandler.cs
deleted file mode 100644
index 59bbbc0ed..000000000
--- a/src/Dap.Protocol/Requests/IDisassembleHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Disassemble, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IDisassembleHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class DisassembleHandler : IDisassembleHandler
- {
- public abstract Task Handle(
- DisassembleArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IDisconnectHandler.cs b/src/Dap.Protocol/Requests/IDisconnectHandler.cs
deleted file mode 100644
index 3583e86df..000000000
--- a/src/Dap.Protocol/Requests/IDisconnectHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Disconnect, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IDisconnectHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class DisconnectHandler : IDisconnectHandler
- {
- public abstract Task Handle(
- DisconnectArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IEvaluateHandler.cs b/src/Dap.Protocol/Requests/IEvaluateHandler.cs
deleted file mode 100644
index 3cb7a9a97..000000000
--- a/src/Dap.Protocol/Requests/IEvaluateHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Evaluate, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IEvaluateHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class EvaluateHandler : IEvaluateHandler
- {
- public abstract Task Handle(EvaluateArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IExceptionInfoHandler.cs b/src/Dap.Protocol/Requests/IExceptionInfoHandler.cs
deleted file mode 100644
index fcb2044ac..000000000
--- a/src/Dap.Protocol/Requests/IExceptionInfoHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.ExceptionInfo, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IExceptionInfoHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class ExceptionInfoHandler : IExceptionInfoHandler
- {
- public abstract Task Handle(
- ExceptionInfoArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IGotoHandler.cs b/src/Dap.Protocol/Requests/IGotoHandler.cs
deleted file mode 100644
index e7b10f35f..000000000
--- a/src/Dap.Protocol/Requests/IGotoHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Goto, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IGotoHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class GotoHandler : IGotoHandler
- {
- public abstract Task Handle(GotoArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IGotoTargetsHandler.cs b/src/Dap.Protocol/Requests/IGotoTargetsHandler.cs
deleted file mode 100644
index 381429062..000000000
--- a/src/Dap.Protocol/Requests/IGotoTargetsHandler.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.GotoTargets, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IGotoTargetsHandler : IJsonRpcRequestHandler
- {
- }
-
-
- public abstract class GotoTargetsHandler : IGotoTargetsHandler
- {
- public abstract Task Handle(
- GotoTargetsArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/ILaunchHandler.cs b/src/Dap.Protocol/Requests/ILaunchHandler.cs
deleted file mode 100644
index 9d5dd861f..000000000
--- a/src/Dap.Protocol/Requests/ILaunchHandler.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Launch, Direction.ClientToServer)]
- [GenerateHandlerMethods(AllowDerivedRequests = true)]
- [GenerateRequestMethods]
- public interface ILaunchHandler : IJsonRpcRequestHandler where T : LaunchRequestArguments
- {
- }
-
- public interface ILaunchHandler : ILaunchHandler
- {
- }
-
- public abstract class LaunchHandlerBase : ILaunchHandler where T : LaunchRequestArguments
- {
- public abstract Task Handle(T request, CancellationToken cancellationToken);
- }
-
- public abstract class LaunchHandler : LaunchHandlerBase, ILaunchHandler
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/ILoadedSourcesHandler.cs b/src/Dap.Protocol/Requests/ILoadedSourcesHandler.cs
deleted file mode 100644
index 4810d3d29..000000000
--- a/src/Dap.Protocol/Requests/ILoadedSourcesHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.LoadedSources, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ILoadedSourcesHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class LoadedSourcesHandler : ILoadedSourcesHandler
- {
- public abstract Task Handle(
- LoadedSourcesArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IModulesHandler.cs b/src/Dap.Protocol/Requests/IModulesHandler.cs
deleted file mode 100644
index a023f1325..000000000
--- a/src/Dap.Protocol/Requests/IModulesHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Modules, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IModulesHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class ModulesHandler : IModulesHandler
- {
- public abstract Task Handle(ModulesArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/INextHandler.cs b/src/Dap.Protocol/Requests/INextHandler.cs
deleted file mode 100644
index 2e85d22eb..000000000
--- a/src/Dap.Protocol/Requests/INextHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Next, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface INextHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class NextHandler : INextHandler
- {
- public abstract Task Handle(NextArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IPauseHandler.cs b/src/Dap.Protocol/Requests/IPauseHandler.cs
deleted file mode 100644
index e8625f2ba..000000000
--- a/src/Dap.Protocol/Requests/IPauseHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Pause, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IPauseHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class PauseHandler : IPauseHandler
- {
- public abstract Task Handle(PauseArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IReadMemoryHandler.cs b/src/Dap.Protocol/Requests/IReadMemoryHandler.cs
deleted file mode 100644
index 5b0839761..000000000
--- a/src/Dap.Protocol/Requests/IReadMemoryHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.ReadMemory, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IReadMemoryHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class ReadMemoryHandler : IReadMemoryHandler
- {
- public abstract Task Handle(
- ReadMemoryArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IRestartFrameHandler.cs b/src/Dap.Protocol/Requests/IRestartFrameHandler.cs
deleted file mode 100644
index 474415ab7..000000000
--- a/src/Dap.Protocol/Requests/IRestartFrameHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.RestartFrame, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IRestartFrameHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class RestartFrameHandler : IRestartFrameHandler
- {
- public abstract Task Handle(
- RestartFrameArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IRestartHandler.cs b/src/Dap.Protocol/Requests/IRestartHandler.cs
deleted file mode 100644
index 52e8d4d14..000000000
--- a/src/Dap.Protocol/Requests/IRestartHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Restart, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IRestartHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class RestartHandler : IRestartHandler
- {
- public abstract Task Handle(RestartArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IReverseContinueHandler.cs b/src/Dap.Protocol/Requests/IReverseContinueHandler.cs
deleted file mode 100644
index 379d9a876..000000000
--- a/src/Dap.Protocol/Requests/IReverseContinueHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.ReverseContinue, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IReverseContinueHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class ReverseContinueHandler : IReverseContinueHandler
- {
- public abstract Task Handle(
- ReverseContinueArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IRunInTerminalHandler.cs b/src/Dap.Protocol/Requests/IRunInTerminalHandler.cs
deleted file mode 100644
index fed3be45d..000000000
--- a/src/Dap.Protocol/Requests/IRunInTerminalHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.RunInTerminal, Direction.ServerToClient)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IRunInTerminalHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class RunInTerminalHandler : IRunInTerminalHandler
- {
- public abstract Task Handle(RunInTerminalArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IScopesHandler.cs b/src/Dap.Protocol/Requests/IScopesHandler.cs
deleted file mode 100644
index cb1eaf6da..000000000
--- a/src/Dap.Protocol/Requests/IScopesHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Scopes, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IScopesHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class ScopesHandler : IScopesHandler
- {
- public abstract Task Handle(ScopesArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/ISetBreakpointsHandler.cs b/src/Dap.Protocol/Requests/ISetBreakpointsHandler.cs
deleted file mode 100644
index adecde255..000000000
--- a/src/Dap.Protocol/Requests/ISetBreakpointsHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.SetBreakpoints, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ISetBreakpointsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class SetBreakpointsHandler : ISetBreakpointsHandler
- {
- public abstract Task Handle(
- SetBreakpointsArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/ISetDataBreakpointsHandler.cs b/src/Dap.Protocol/Requests/ISetDataBreakpointsHandler.cs
deleted file mode 100644
index f8d2e2f6d..000000000
--- a/src/Dap.Protocol/Requests/ISetDataBreakpointsHandler.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.SetDataBreakpoints, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface
- ISetDataBreakpointsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class SetDataBreakpointsHandler : ISetDataBreakpointsHandler
- {
- public abstract Task Handle(
- SetDataBreakpointsArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/ISetExceptionBreakpointsHandler.cs b/src/Dap.Protocol/Requests/ISetExceptionBreakpointsHandler.cs
deleted file mode 100644
index ccc486be5..000000000
--- a/src/Dap.Protocol/Requests/ISetExceptionBreakpointsHandler.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.SetExceptionBreakpoints, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ISetExceptionBreakpointsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class SetExceptionBreakpointsHandler : ISetExceptionBreakpointsHandler
- {
- public abstract Task Handle(
- SetExceptionBreakpointsArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/ISetExpressionHandler.cs b/src/Dap.Protocol/Requests/ISetExpressionHandler.cs
deleted file mode 100644
index 680eae018..000000000
--- a/src/Dap.Protocol/Requests/ISetExpressionHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.SetExpression, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ISetExpressionHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class SetExpressionHandler : ISetExpressionHandler
- {
- public abstract Task Handle(
- SetExpressionArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/ISetFunctionBreakpointsHandler.cs b/src/Dap.Protocol/Requests/ISetFunctionBreakpointsHandler.cs
deleted file mode 100644
index f369ecd2f..000000000
--- a/src/Dap.Protocol/Requests/ISetFunctionBreakpointsHandler.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.SetFunctionBreakpoints, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface
- ISetFunctionBreakpointsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class SetFunctionBreakpointsHandler : ISetFunctionBreakpointsHandler
- {
- public abstract Task Handle(
- SetFunctionBreakpointsArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/ISetInstructionBreakpointsHandler.cs b/src/Dap.Protocol/Requests/ISetInstructionBreakpointsHandler.cs
deleted file mode 100644
index dcf6b8fdf..000000000
--- a/src/Dap.Protocol/Requests/ISetInstructionBreakpointsHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.SetInstructionBreakpoints, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ISetInstructionBreakpointsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class SetInstructionBreakpointsHandlerBase : ISetInstructionBreakpointsHandler
- {
- public abstract Task Handle(SetInstructionBreakpointsArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/ISetVariableHandler.cs b/src/Dap.Protocol/Requests/ISetVariableHandler.cs
deleted file mode 100644
index 6614f4292..000000000
--- a/src/Dap.Protocol/Requests/ISetVariableHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.SetVariable, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ISetVariableHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class SetVariableHandler : ISetVariableHandler
- {
- public abstract Task Handle(
- SetVariableArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/ISourceHandler.cs b/src/Dap.Protocol/Requests/ISourceHandler.cs
deleted file mode 100644
index fd657068a..000000000
--- a/src/Dap.Protocol/Requests/ISourceHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Source, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ISourceHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class SourceHandler : ISourceHandler
- {
- public abstract Task Handle(SourceArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IStackTraceHandler.cs b/src/Dap.Protocol/Requests/IStackTraceHandler.cs
deleted file mode 100644
index 28b0fb03f..000000000
--- a/src/Dap.Protocol/Requests/IStackTraceHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.StackTrace, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IStackTraceHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class StackTraceHandler : IStackTraceHandler
- {
- public abstract Task Handle(
- StackTraceArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IStepBackHandler.cs b/src/Dap.Protocol/Requests/IStepBackHandler.cs
deleted file mode 100644
index 0210d70ad..000000000
--- a/src/Dap.Protocol/Requests/IStepBackHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.StepBack, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IStepBackHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class StepBackHandler : IStepBackHandler
- {
- public abstract Task Handle(StepBackArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IStepInHandler.cs b/src/Dap.Protocol/Requests/IStepInHandler.cs
deleted file mode 100644
index 6f4c1fe08..000000000
--- a/src/Dap.Protocol/Requests/IStepInHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.StepIn, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IStepInHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class StepInHandler : IStepInHandler
- {
- public abstract Task Handle(StepInArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IStepInTargetsHandler.cs b/src/Dap.Protocol/Requests/IStepInTargetsHandler.cs
deleted file mode 100644
index bc0d67888..000000000
--- a/src/Dap.Protocol/Requests/IStepInTargetsHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.StepInTargets, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IStepInTargetsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class StepInTargetsHandler : IStepInTargetsHandler
- {
- public abstract Task Handle(
- StepInTargetsArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IStepOutHandler.cs b/src/Dap.Protocol/Requests/IStepOutHandler.cs
deleted file mode 100644
index 252c40a2a..000000000
--- a/src/Dap.Protocol/Requests/IStepOutHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.StepOut, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IStepOutHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class StepOutHandler : IStepOutHandler
- {
- public abstract Task Handle(StepOutArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/ITerminateHandler.cs b/src/Dap.Protocol/Requests/ITerminateHandler.cs
deleted file mode 100644
index 100c5ad9e..000000000
--- a/src/Dap.Protocol/Requests/ITerminateHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Terminate, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ITerminateHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class TerminateHandler : ITerminateHandler
- {
- public abstract Task Handle(TerminateArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/ITerminateThreadsHandler.cs b/src/Dap.Protocol/Requests/ITerminateThreadsHandler.cs
deleted file mode 100644
index eb46155ef..000000000
--- a/src/Dap.Protocol/Requests/ITerminateThreadsHandler.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.TerminateThreads, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface ITerminateThreadsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class TerminateThreadsHandler : ITerminateThreadsHandler
- {
- public abstract Task Handle(
- TerminateThreadsArguments request,
- CancellationToken cancellationToken
- );
- }
-}
diff --git a/src/Dap.Protocol/Requests/IThreadsHandler.cs b/src/Dap.Protocol/Requests/IThreadsHandler.cs
deleted file mode 100644
index 297a3be16..000000000
--- a/src/Dap.Protocol/Requests/IThreadsHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Threads, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IThreadsHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class ThreadsHandler : IThreadsHandler
- {
- public abstract Task Handle(ThreadsArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/IVariablesHandler.cs b/src/Dap.Protocol/Requests/IVariablesHandler.cs
deleted file mode 100644
index 98b1ae590..000000000
--- a/src/Dap.Protocol/Requests/IVariablesHandler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-using OmniSharp.Extensions.JsonRpc;
-using OmniSharp.Extensions.JsonRpc.Generation;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Parallel]
- [Method(RequestNames.Variables, Direction.ClientToServer)]
- [GenerateHandlerMethods]
- [GenerateRequestMethods]
- public interface IVariablesHandler : IJsonRpcRequestHandler
- {
- }
-
- public abstract class VariablesHandler : IVariablesHandler
- {
- public abstract Task Handle(VariablesArguments request, CancellationToken cancellationToken);
- }
-}
diff --git a/src/Dap.Protocol/Requests/InitializeRequestArguments.cs b/src/Dap.Protocol/Requests/InitializeRequestArguments.cs
deleted file mode 100644
index bd83f5bca..000000000
--- a/src/Dap.Protocol/Requests/InitializeRequestArguments.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Initialize, Direction.ClientToServer)]
- public class InitializeRequestArguments : IRequest, IInitializeRequestArguments
- {
- ///
- /// The ID of the(frontend) client using this adapter.
- ///
-
- [Optional]
- public string? ClientId { get; set; }
-
- ///
- /// The human readable name of the(frontend) client using this adapter.
- ///
-
- [Optional]
- public string? ClientName { get; set; }
-
- ///
- /// The ID of the debug adapter.
- ///
- public string AdapterId { get; set; } = null!;
-
- ///
- /// The ISO-639 locale of the(frontend) client using this adapter, e.g.en-US or de-CH.
- ///
-
- [Optional]
- public string? Locale { get; set; }
-
- ///
- /// If true all line numbers are 1-based(default).
- ///
- [Optional]
- public bool LinesStartAt1 { get; set; }
-
- ///
- /// If true all column numbers are 1-based(default).
- ///
- [Optional]
- public bool ColumnsStartAt1 { get; set; }
-
- ///
- /// Determines in what format paths are specified.The default is 'path', which is the native format.
- /// Values: 'path', 'uri', etc.
- ///
- [Optional]
- public string? PathFormat { get; set; }
-
- ///
- /// Client supports the optional type attribute for variables.
- ///
- [Optional]
- public bool SupportsVariableType { get; set; }
-
- ///
- /// Client supports the paging of variables.
- ///
- [Optional]
- public bool SupportsVariablePaging { get; set; }
-
- ///
- /// Client supports the runInTerminal request.
- ///
- [Optional]
- public bool SupportsRunInTerminalRequest { get; set; }
-
- ///
- /// Client supports memory references.
- ///
- [Optional]
- public bool SupportsMemoryReferences { get; set; }
-
- ///
- /// Client supports progress reporting.
- ///
- [Optional]
- public bool SupportsProgressReporting { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/InitializeResponse.cs b/src/Dap.Protocol/Requests/InitializeResponse.cs
deleted file mode 100644
index 0606368e8..000000000
--- a/src/Dap.Protocol/Requests/InitializeResponse.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class InitializeResponse : Capabilities
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/LaunchRequestArguments.cs b/src/Dap.Protocol/Requests/LaunchRequestArguments.cs
deleted file mode 100644
index 67f3831a2..000000000
--- a/src/Dap.Protocol/Requests/LaunchRequestArguments.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Collections.Generic;
-using MediatR;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Launch, Direction.ClientToServer)]
- public class LaunchRequestArguments : IRequest
- {
- ///
- /// If noDebug is true the launch request should launch the program without enabling debugging.
- ///
- [Optional]
- public bool NoDebug { get; set; }
-
- ///
- /// Optional data from the previous, restarted session.
- /// The data is sent as the 'restart' attribute of the 'terminated' event.
- /// The client should leave the data intact.
- ///
- [Optional]
- [JsonProperty(PropertyName = "__restart")]
- public JToken? Restart { get; set; }
-
- [JsonExtensionData] public IDictionary ExtensionData { get; set; } = new Dictionary();
- }
-}
diff --git a/src/Dap.Protocol/Requests/LaunchResponse.cs b/src/Dap.Protocol/Requests/LaunchResponse.cs
deleted file mode 100644
index d9440bc23..000000000
--- a/src/Dap.Protocol/Requests/LaunchResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class LaunchResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/LoadedSourcesArguments.cs b/src/Dap.Protocol/Requests/LoadedSourcesArguments.cs
deleted file mode 100644
index bdbde448a..000000000
--- a/src/Dap.Protocol/Requests/LoadedSourcesArguments.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.LoadedSources, Direction.ClientToServer)]
- public class LoadedSourcesArguments : IRequest
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/LoadedSourcesResponse.cs b/src/Dap.Protocol/Requests/LoadedSourcesResponse.cs
deleted file mode 100644
index a047ee61c..000000000
--- a/src/Dap.Protocol/Requests/LoadedSourcesResponse.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class LoadedSourcesResponse
- {
- ///
- /// Set of loaded sources.
- ///
- public Container Sources { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/ModulesArguments.cs b/src/Dap.Protocol/Requests/ModulesArguments.cs
deleted file mode 100644
index f33bd9eda..000000000
--- a/src/Dap.Protocol/Requests/ModulesArguments.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Modules, Direction.ClientToServer)]
- public class ModulesArguments : IRequest
- {
- ///
- /// The index of the first module to return; if omitted modules start at 0.
- ///
- [Optional]
- public long? StartModule { get; set; }
-
- ///
- /// The number of modules to return. If moduleCount is not specified or 0, all modules are returned.
- ///
- [Optional]
- public long? ModuleCount { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/ModulesResponse.cs b/src/Dap.Protocol/Requests/ModulesResponse.cs
deleted file mode 100644
index d20cfb3ed..000000000
--- a/src/Dap.Protocol/Requests/ModulesResponse.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class ModulesResponse
- {
- ///
- /// All modules or range of modules.
- ///
- public Container Modules { get; set; } = null!;
-
- ///
- /// The total number of modules available.
- ///
- [Optional]
- public long? TotalModules { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/NextArguments.cs b/src/Dap.Protocol/Requests/NextArguments.cs
deleted file mode 100644
index a3945fbff..000000000
--- a/src/Dap.Protocol/Requests/NextArguments.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Next, Direction.ClientToServer)]
- public class NextArguments : IRequest
- {
- ///
- /// Execute 'next' for this thread.
- ///
- public long ThreadId { get; set; }
-
- ///
- /// Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.
- ///
- [Optional]
- public SteppingGranularity Granularity { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/NextResponse.cs b/src/Dap.Protocol/Requests/NextResponse.cs
deleted file mode 100644
index 7596c3f22..000000000
--- a/src/Dap.Protocol/Requests/NextResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class NextResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/PauseArguments.cs b/src/Dap.Protocol/Requests/PauseArguments.cs
deleted file mode 100644
index 2501fbebd..000000000
--- a/src/Dap.Protocol/Requests/PauseArguments.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Pause, Direction.ClientToServer)]
- public class PauseArguments : IRequest
- {
- ///
- /// Pause execution for this thread.
- ///
- public long ThreadId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/PauseResponse.cs b/src/Dap.Protocol/Requests/PauseResponse.cs
deleted file mode 100644
index 8a270ea42..000000000
--- a/src/Dap.Protocol/Requests/PauseResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class PauseResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/ReadMemoryArguments.cs b/src/Dap.Protocol/Requests/ReadMemoryArguments.cs
deleted file mode 100644
index fbef64d34..000000000
--- a/src/Dap.Protocol/Requests/ReadMemoryArguments.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.ReadMemory, Direction.ClientToServer)]
- public class ReadMemoryArguments : IRequest
- {
- ///
- /// Memory reference to the base location from which data should be read.
- ///
- public string MemoryReference { get; set; } = null!;
-
- ///
- /// Optional offset(in bytes) to be applied to the reference location before reading data.Can be negative.
- ///
-
- [Optional]
- public long? Offset { get; set; }
-
- ///
- /// Number of bytes to read at the specified location and offset.
- ///
- public long Count { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/ReadMemoryResponse.cs b/src/Dap.Protocol/Requests/ReadMemoryResponse.cs
deleted file mode 100644
index 1d3198073..000000000
--- a/src/Dap.Protocol/Requests/ReadMemoryResponse.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class ReadMemoryResponse
- {
- ///
- /// The address of the first byte of data returned.Treated as a hex value if prefixed with '0x', or as a decimal value otherwise.
- ///
- public string Address { get; set; } = null!;
-
- ///
- /// The number of unreadable bytes encountered after the last successfully read byte. This can be used to determine the number of bytes that must be skipped before a subsequent
- /// 'readMemory' request will succeed.
- ///
- [Optional]
- public long? UnreadableBytes { get; set; }
-
- ///
- /// The bytes read from memory, encoded using base64.
- ///
- [Optional]
- public string? Data { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/RestartArguments.cs b/src/Dap.Protocol/Requests/RestartArguments.cs
deleted file mode 100644
index bb5f67042..000000000
--- a/src/Dap.Protocol/Requests/RestartArguments.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Restart, Direction.ClientToServer)]
- public class RestartArguments : IRequest
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/RestartFrameArguments.cs b/src/Dap.Protocol/Requests/RestartFrameArguments.cs
deleted file mode 100644
index 58c181677..000000000
--- a/src/Dap.Protocol/Requests/RestartFrameArguments.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.RestartFrame, Direction.ClientToServer)]
- public class RestartFrameArguments : IRequest
- {
- ///
- /// Restart this stackframe.
- ///
- public long FrameId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/RestartFrameResponse.cs b/src/Dap.Protocol/Requests/RestartFrameResponse.cs
deleted file mode 100644
index 45bbe22b8..000000000
--- a/src/Dap.Protocol/Requests/RestartFrameResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class RestartFrameResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/RestartResponse.cs b/src/Dap.Protocol/Requests/RestartResponse.cs
deleted file mode 100644
index 5ff989df7..000000000
--- a/src/Dap.Protocol/Requests/RestartResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class RestartResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/ReverseContinueArguments.cs b/src/Dap.Protocol/Requests/ReverseContinueArguments.cs
deleted file mode 100644
index 5b08987ea..000000000
--- a/src/Dap.Protocol/Requests/ReverseContinueArguments.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.ReverseContinue, Direction.ClientToServer)]
- public class ReverseContinueArguments : IRequest
- {
- ///
- /// Execute 'reverseContinue' for this thread.
- ///
- public long ThreadId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/ReverseContinueResponse.cs b/src/Dap.Protocol/Requests/ReverseContinueResponse.cs
deleted file mode 100644
index 575b7df83..000000000
--- a/src/Dap.Protocol/Requests/ReverseContinueResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class ReverseContinueResponse
- {
- }
-}
diff --git a/src/Dap.Protocol/Requests/RunInTerminalArguments.cs b/src/Dap.Protocol/Requests/RunInTerminalArguments.cs
deleted file mode 100644
index a85a5ad0b..000000000
--- a/src/Dap.Protocol/Requests/RunInTerminalArguments.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System.Collections.Generic;
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.RunInTerminal, Direction.ServerToClient)]
- public class RunInTerminalArguments : IRequest
- {
- ///
- /// What kind of terminal to launch.
- ///
- [Optional]
- public RunInTerminalArgumentsKind? Kind { get; set; }
-
- ///
- /// Optional title of the terminal.
- ///
- [Optional]
- public string? Title { get; set; }
-
- ///
- /// Working directory of the command.
- ///
- public string Cwd { get; set; } = null!;
-
- ///
- /// List of arguments.The first argument is the command to run.
- ///
- public Container Args { get; set; } = null!;
-
- ///
- /// Environment key-value pairs that are added to or removed from the default environment.
- ///
- [Optional]
- public IDictionary? Env { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/RunInTerminalArgumentsKind.cs b/src/Dap.Protocol/Requests/RunInTerminalArgumentsKind.cs
deleted file mode 100644
index 0c9261d14..000000000
--- a/src/Dap.Protocol/Requests/RunInTerminalArgumentsKind.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [JsonConverter(typeof(StringEnumConverter))]
- public enum RunInTerminalArgumentsKind
- {
- Integrated,
- External
- }
-}
diff --git a/src/Dap.Protocol/Requests/RunInTerminalResponse.cs b/src/Dap.Protocol/Requests/RunInTerminalResponse.cs
deleted file mode 100644
index 1abad903b..000000000
--- a/src/Dap.Protocol/Requests/RunInTerminalResponse.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class RunInTerminalResponse
- {
- ///
- /// The process ID.
- ///
- [Optional]
- public long? ProcessId { get; set; }
-
- ///
- /// The process ID of the terminal shell.
- ///
- [Optional]
- public long? ShellProcessId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/ScopesArguments.cs b/src/Dap.Protocol/Requests/ScopesArguments.cs
deleted file mode 100644
index 4a619febc..000000000
--- a/src/Dap.Protocol/Requests/ScopesArguments.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.Scopes, Direction.ClientToServer)]
- public class ScopesArguments : IRequest
- {
- ///
- /// Retrieve the scopes for this stackframe.
- ///
- public long FrameId { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/ScopesResponse.cs b/src/Dap.Protocol/Requests/ScopesResponse.cs
deleted file mode 100644
index d1e534742..000000000
--- a/src/Dap.Protocol/Requests/ScopesResponse.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class ScopesResponse
- {
- ///
- /// The scopes of the stackframe.If the array has length zero, there are no scopes available.
- ///
- public Container Scopes { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/SetBreakpointsArguments.cs b/src/Dap.Protocol/Requests/SetBreakpointsArguments.cs
deleted file mode 100644
index 1a0fca177..000000000
--- a/src/Dap.Protocol/Requests/SetBreakpointsArguments.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.SetBreakpoints, Direction.ClientToServer)]
- public class SetBreakpointsArguments : IRequest
- {
- ///
- /// The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified.
- ///
- public Source Source { get; set; } = null!;
-
- ///
- /// The code locations of the breakpoints.
- ///
- [Optional]
- public Container? Breakpoints { get; set; }
-
- ///
- /// Deprecated: The code locations of the breakpoints.
- ///
- [Obsolete("Deprecated")]
- [Optional]
- public Container? Lines { get; set; }
-
- ///
- /// A value of true indicates that the underlying source has been modified which results in new breakpoint locations.
- ///
- [Optional]
- public bool SourceModified { get; set; }
- }
-}
diff --git a/src/Dap.Protocol/Requests/SetBreakpointsResponse.cs b/src/Dap.Protocol/Requests/SetBreakpointsResponse.cs
deleted file mode 100644
index f3179a696..000000000
--- a/src/Dap.Protocol/Requests/SetBreakpointsResponse.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class SetBreakpointsResponse
- {
- ///
- /// Information about the breakpoints.The array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments.
- ///
- public Container Breakpoints { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/SetDataBreakpointsArguments.cs b/src/Dap.Protocol/Requests/SetDataBreakpointsArguments.cs
deleted file mode 100644
index 5eb3e4c45..000000000
--- a/src/Dap.Protocol/Requests/SetDataBreakpointsArguments.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.SetDataBreakpoints, Direction.ClientToServer)]
- public class SetDataBreakpointsArguments : IRequest
- {
- ///
- /// The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints.
- ///
- public Container Breakpoints { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/SetDataBreakpointsResponse.cs b/src/Dap.Protocol/Requests/SetDataBreakpointsResponse.cs
deleted file mode 100644
index cbeb97da8..000000000
--- a/src/Dap.Protocol/Requests/SetDataBreakpointsResponse.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- public class SetDataBreakpointsResponse
- {
- ///
- /// Information about the data breakpoints.The array elements correspond to the elements of the input argument 'breakpoints' array.
- ///
- public Container Breakpoints { get; set; } = null!;
- }
-}
diff --git a/src/Dap.Protocol/Requests/SetExceptionBreakpointsArguments.cs b/src/Dap.Protocol/Requests/SetExceptionBreakpointsArguments.cs
deleted file mode 100644
index 5c03cc29b..000000000
--- a/src/Dap.Protocol/Requests/SetExceptionBreakpointsArguments.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using MediatR;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
-using OmniSharp.Extensions.JsonRpc;
-
-namespace OmniSharp.Extensions.DebugAdapter.Protocol.Requests
-{
- [Method(RequestNames.SetExceptionBreakpoints, Direction.ClientToServer)]
- public class SetExceptionBreakpointsArguments : IRequest