diff --git a/DotNetTry.sln b/DotNetTry.sln index 183afdc31..c7a22c8ad 100644 --- a/DotNetTry.sln +++ b/DotNetTry.sln @@ -61,6 +61,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactiv EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.Jupyter", "Microsoft.DotNet.Interactive.Jupyter\Microsoft.DotNet.Interactive.Jupyter.csproj", "{113A4166-5734-4F6E-B609-D6CF42679399}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive", "Microsoft.DotNet.Interactive\Microsoft.DotNet.Interactive.csproj", "{2BB7CCD7-73D1-4B16-82EC-A5D0183F8CF5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -175,6 +177,10 @@ Global {113A4166-5734-4F6E-B609-D6CF42679399}.Debug|Any CPU.Build.0 = Debug|Any CPU {113A4166-5734-4F6E-B609-D6CF42679399}.Release|Any CPU.ActiveCfg = Release|Any CPU {113A4166-5734-4F6E-B609-D6CF42679399}.Release|Any CPU.Build.0 = Release|Any CPU + {2BB7CCD7-73D1-4B16-82EC-A5D0183F8CF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2BB7CCD7-73D1-4B16-82EC-A5D0183F8CF5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BB7CCD7-73D1-4B16-82EC-A5D0183F8CF5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2BB7CCD7-73D1-4B16-82EC-A5D0183F8CF5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -206,6 +212,7 @@ Global {B4B9DC70-6BA2-4BC1-A780-7FCEBDB1D218} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} {91902AAC-F4E9-4648-AC6B-4E4A722D3CC5} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} {113A4166-5734-4F6E-B609-D6CF42679399} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} + {2BB7CCD7-73D1-4B16-82EC-A5D0183F8CF5} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D6CD99BA-B16B-4570-8910-225CBDFFA3AD} diff --git a/MLS.Agent/CommandLine/CommandLineParser.cs b/MLS.Agent/CommandLine/CommandLineParser.cs index 1c6a80812..8ccaecb82 100644 --- a/MLS.Agent/CommandLine/CommandLineParser.cs +++ b/MLS.Agent/CommandLine/CommandLineParser.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Clockwise; using Microsoft.AspNetCore.Hosting; +using Microsoft.DotNet.Interactive; using Microsoft.DotNet.Interactive.Jupyter; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/Microsoft.DotNet.Interactive.Jupyter/CompleteRequestHandler.cs b/Microsoft.DotNet.Interactive.Jupyter/CompleteRequestHandler.cs index 3291d8c23..786df2785 100644 --- a/Microsoft.DotNet.Interactive.Jupyter/CompleteRequestHandler.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/CompleteRequestHandler.cs @@ -6,6 +6,8 @@ using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Commands; +using Microsoft.DotNet.Interactive.Events; using Microsoft.DotNet.Interactive.Jupyter.Protocol; using WorkspaceServer.Kernel; diff --git a/Microsoft.DotNet.Interactive.Jupyter/ExecuteRequestHandler.cs b/Microsoft.DotNet.Interactive.Jupyter/ExecuteRequestHandler.cs index f578375ae..85f0c1ddb 100644 --- a/Microsoft.DotNet.Interactive.Jupyter/ExecuteRequestHandler.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/ExecuteRequestHandler.cs @@ -7,6 +7,8 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Commands; +using Microsoft.DotNet.Interactive.Events; using Microsoft.DotNet.Interactive.Jupyter.Protocol; using WorkspaceServer.Kernel; diff --git a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj index 6581538e1..04de35faa 100644 --- a/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj +++ b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj @@ -20,6 +20,7 @@ + diff --git a/Microsoft.DotNet.Interactive.Jupyter/RequestHandlerBase.cs b/Microsoft.DotNet.Interactive.Jupyter/RequestHandlerBase.cs index 9e855ec23..a627868d7 100644 --- a/Microsoft.DotNet.Interactive.Jupyter/RequestHandlerBase.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/RequestHandlerBase.cs @@ -5,6 +5,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Reactive.Disposables; +using Microsoft.DotNet.Interactive.Commands; using Microsoft.DotNet.Interactive.Jupyter.Protocol; using WorkspaceServer.Kernel; diff --git a/WorkspaceServer/Kernel/IKernelCommand.cs b/Microsoft.DotNet.Interactive/Commands/IKernelCommand.cs similarity index 82% rename from WorkspaceServer/Kernel/IKernelCommand.cs rename to Microsoft.DotNet.Interactive/Commands/IKernelCommand.cs index fc7b26a7f..baf555035 100644 --- a/WorkspaceServer/Kernel/IKernelCommand.cs +++ b/Microsoft.DotNet.Interactive/Commands/IKernelCommand.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Commands { public interface IKernelCommand { diff --git a/WorkspaceServer/Kernel/KernelCommandBase.cs b/Microsoft.DotNet.Interactive/Commands/KernelCommandBase.cs similarity index 84% rename from WorkspaceServer/Kernel/KernelCommandBase.cs rename to Microsoft.DotNet.Interactive/Commands/KernelCommandBase.cs index 1bab8c528..51c2b683e 100644 --- a/WorkspaceServer/Kernel/KernelCommandBase.cs +++ b/Microsoft.DotNet.Interactive/Commands/KernelCommandBase.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Commands { public abstract class KernelCommandBase : IKernelCommand { diff --git a/WorkspaceServer/Kernel/RequestCompletion.cs b/Microsoft.DotNet.Interactive/Commands/RequestCompletion.cs similarity index 95% rename from WorkspaceServer/Kernel/RequestCompletion.cs rename to Microsoft.DotNet.Interactive/Commands/RequestCompletion.cs index fd1789df6..ed27b9607 100644 --- a/WorkspaceServer/Kernel/RequestCompletion.cs +++ b/Microsoft.DotNet.Interactive/Commands/RequestCompletion.cs @@ -5,7 +5,7 @@ using System; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Commands { public class RequestCompletion : KernelCommandBase { diff --git a/WorkspaceServer/Kernel/RequestDiagnostics.cs b/Microsoft.DotNet.Interactive/Commands/RequestDiagnostics.cs similarity index 83% rename from WorkspaceServer/Kernel/RequestDiagnostics.cs rename to Microsoft.DotNet.Interactive/Commands/RequestDiagnostics.cs index 705a4f6a8..244b7be11 100644 --- a/WorkspaceServer/Kernel/RequestDiagnostics.cs +++ b/Microsoft.DotNet.Interactive/Commands/RequestDiagnostics.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Commands { public class RequestDiagnostics : KernelCommandBase { diff --git a/WorkspaceServer/Kernel/RequestDocumentation.cs b/Microsoft.DotNet.Interactive/Commands/RequestDocumentation.cs similarity index 83% rename from WorkspaceServer/Kernel/RequestDocumentation.cs rename to Microsoft.DotNet.Interactive/Commands/RequestDocumentation.cs index aa055c1c9..89e2eff7a 100644 --- a/WorkspaceServer/Kernel/RequestDocumentation.cs +++ b/Microsoft.DotNet.Interactive/Commands/RequestDocumentation.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Commands { public class RequestDocumentation : KernelCommandBase { diff --git a/WorkspaceServer/Kernel/RequestSignatureHelp.cs b/Microsoft.DotNet.Interactive/Commands/RequestSignatureHelp.cs similarity index 83% rename from WorkspaceServer/Kernel/RequestSignatureHelp.cs rename to Microsoft.DotNet.Interactive/Commands/RequestSignatureHelp.cs index 292beb6af..ddda6f91f 100644 --- a/WorkspaceServer/Kernel/RequestSignatureHelp.cs +++ b/Microsoft.DotNet.Interactive/Commands/RequestSignatureHelp.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Commands { public class RequestSignatureHelp : KernelCommandBase { diff --git a/WorkspaceServer/Kernel/SendStandardInput.cs b/Microsoft.DotNet.Interactive/Commands/SendStandardInput.cs similarity index 83% rename from WorkspaceServer/Kernel/SendStandardInput.cs rename to Microsoft.DotNet.Interactive/Commands/SendStandardInput.cs index fc3d58917..a4b8f7257 100644 --- a/WorkspaceServer/Kernel/SendStandardInput.cs +++ b/Microsoft.DotNet.Interactive/Commands/SendStandardInput.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Commands { public class SendStandardInput : KernelCommandBase { diff --git a/WorkspaceServer/Kernel/SubmitCode.cs b/Microsoft.DotNet.Interactive/Commands/SubmitCode.cs similarity index 92% rename from WorkspaceServer/Kernel/SubmitCode.cs rename to Microsoft.DotNet.Interactive/Commands/SubmitCode.cs index d9d764185..fbf611134 100644 --- a/WorkspaceServer/Kernel/SubmitCode.cs +++ b/Microsoft.DotNet.Interactive/Commands/SubmitCode.cs @@ -3,7 +3,7 @@ using System; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Commands { public class SubmitCode : KernelCommandBase { diff --git a/WorkspaceServer/Kernel/CompletionItem.cs b/Microsoft.DotNet.Interactive/CompletionItem.cs similarity index 96% rename from WorkspaceServer/Kernel/CompletionItem.cs rename to Microsoft.DotNet.Interactive/CompletionItem.cs index 6bdf582dc..dc94f2b12 100644 --- a/WorkspaceServer/Kernel/CompletionItem.cs +++ b/Microsoft.DotNet.Interactive/CompletionItem.cs @@ -3,7 +3,7 @@ using System; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class CompletionItem { diff --git a/WorkspaceServer/Kernel/CompositeKernel.cs b/Microsoft.DotNet.Interactive/CompositeKernel.cs similarity index 96% rename from WorkspaceServer/Kernel/CompositeKernel.cs rename to Microsoft.DotNet.Interactive/CompositeKernel.cs index b95a6be42..552467f8b 100644 --- a/WorkspaceServer/Kernel/CompositeKernel.cs +++ b/Microsoft.DotNet.Interactive/CompositeKernel.cs @@ -9,8 +9,9 @@ using System.CommandLine.Invocation; using System.Linq; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class CompositeKernel : KernelBase, IEnumerable { diff --git a/WorkspaceServer/Kernel/CodeSubmissionEvaluated.cs b/Microsoft.DotNet.Interactive/Events/CodeSubmissionEvaluated.cs similarity index 81% rename from WorkspaceServer/Kernel/CodeSubmissionEvaluated.cs rename to Microsoft.DotNet.Interactive/Events/CodeSubmissionEvaluated.cs index a838d0e64..2706a9324 100644 --- a/WorkspaceServer/Kernel/CodeSubmissionEvaluated.cs +++ b/Microsoft.DotNet.Interactive/Events/CodeSubmissionEvaluated.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class CodeSubmissionEvaluated : KernelEventBase { diff --git a/WorkspaceServer/Kernel/CodeSubmissionEvaluationFailed.cs b/Microsoft.DotNet.Interactive/Events/CodeSubmissionEvaluationFailed.cs similarity index 88% rename from WorkspaceServer/Kernel/CodeSubmissionEvaluationFailed.cs rename to Microsoft.DotNet.Interactive/Events/CodeSubmissionEvaluationFailed.cs index bf675507d..64016fb1f 100644 --- a/WorkspaceServer/Kernel/CodeSubmissionEvaluationFailed.cs +++ b/Microsoft.DotNet.Interactive/Events/CodeSubmissionEvaluationFailed.cs @@ -2,8 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class CodeSubmissionEvaluationFailed : KernelEventBase { diff --git a/WorkspaceServer/Kernel/CodeSubmissionReceived.cs b/Microsoft.DotNet.Interactive/Events/CodeSubmissionReceived.cs similarity index 84% rename from WorkspaceServer/Kernel/CodeSubmissionReceived.cs rename to Microsoft.DotNet.Interactive/Events/CodeSubmissionReceived.cs index e9bd0625c..06c332ab4 100644 --- a/WorkspaceServer/Kernel/CodeSubmissionReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/CodeSubmissionReceived.cs @@ -2,8 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class CodeSubmissionReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/CompleteCodeSubmissionReceived.cs b/Microsoft.DotNet.Interactive/Events/CompleteCodeSubmissionReceived.cs similarity index 80% rename from WorkspaceServer/Kernel/CompleteCodeSubmissionReceived.cs rename to Microsoft.DotNet.Interactive/Events/CompleteCodeSubmissionReceived.cs index 5fd825f19..6513ca37f 100644 --- a/WorkspaceServer/Kernel/CompleteCodeSubmissionReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/CompleteCodeSubmissionReceived.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class CompleteCodeSubmissionReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/CompletionRequestCompleted.cs b/Microsoft.DotNet.Interactive/Events/CompletionRequestCompleted.cs similarity index 87% rename from WorkspaceServer/Kernel/CompletionRequestCompleted.cs rename to Microsoft.DotNet.Interactive/Events/CompletionRequestCompleted.cs index 48026e50b..6fa2dd0fc 100644 --- a/WorkspaceServer/Kernel/CompletionRequestCompleted.cs +++ b/Microsoft.DotNet.Interactive/Events/CompletionRequestCompleted.cs @@ -3,8 +3,9 @@ using System; using System.Collections.Generic; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class CompletionRequestCompleted : KernelEventBase { diff --git a/WorkspaceServer/Kernel/CompletionRequestReceived.cs b/Microsoft.DotNet.Interactive/Events/CompletionRequestReceived.cs similarity index 79% rename from WorkspaceServer/Kernel/CompletionRequestReceived.cs rename to Microsoft.DotNet.Interactive/Events/CompletionRequestReceived.cs index 7e565bb4e..c09beb33f 100644 --- a/WorkspaceServer/Kernel/CompletionRequestReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/CompletionRequestReceived.cs @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +using Microsoft.DotNet.Interactive.Commands; + +namespace Microsoft.DotNet.Interactive.Events { public class CompletionRequestReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/DiagnosticsReceived.cs b/Microsoft.DotNet.Interactive/Events/DiagnosticsReceived.cs similarity index 78% rename from WorkspaceServer/Kernel/DiagnosticsReceived.cs rename to Microsoft.DotNet.Interactive/Events/DiagnosticsReceived.cs index 44cef6bfc..aa4b0a381 100644 --- a/WorkspaceServer/Kernel/DiagnosticsReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/DiagnosticsReceived.cs @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +using Microsoft.DotNet.Interactive.Commands; + +namespace Microsoft.DotNet.Interactive.Events { public class DiagnosticsReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/DocumentationReceived.cs b/Microsoft.DotNet.Interactive/Events/DocumentationReceived.cs similarity index 79% rename from WorkspaceServer/Kernel/DocumentationReceived.cs rename to Microsoft.DotNet.Interactive/Events/DocumentationReceived.cs index 13925fa48..c57bdc434 100644 --- a/WorkspaceServer/Kernel/DocumentationReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/DocumentationReceived.cs @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +using Microsoft.DotNet.Interactive.Commands; + +namespace Microsoft.DotNet.Interactive.Events { public class DocumentationReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/ExtensionLoading.cs b/Microsoft.DotNet.Interactive/Events/ExtensionLoading.cs similarity index 91% rename from WorkspaceServer/Kernel/ExtensionLoading.cs rename to Microsoft.DotNet.Interactive/Events/ExtensionLoading.cs index 4c193e0c8..cebbc29d6 100644 --- a/WorkspaceServer/Kernel/ExtensionLoading.cs +++ b/Microsoft.DotNet.Interactive/Events/ExtensionLoading.cs @@ -4,7 +4,7 @@ using System; using System.IO; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class ExtensionLoading : KernelEventBase { diff --git a/WorkspaceServer/Kernel/IKernelEvent.cs b/Microsoft.DotNet.Interactive/Events/IKernelEvent.cs similarity index 74% rename from WorkspaceServer/Kernel/IKernelEvent.cs rename to Microsoft.DotNet.Interactive/Events/IKernelEvent.cs index 96dc6d414..6ed5ee427 100644 --- a/WorkspaceServer/Kernel/IKernelEvent.cs +++ b/Microsoft.DotNet.Interactive/Events/IKernelEvent.cs @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +using Microsoft.DotNet.Interactive.Commands; + +namespace Microsoft.DotNet.Interactive.Events { public interface IKernelEvent { diff --git a/WorkspaceServer/Kernel/IncompleteCodeSubmissionReceived.cs b/Microsoft.DotNet.Interactive/Events/IncompleteCodeSubmissionReceived.cs similarity index 80% rename from WorkspaceServer/Kernel/IncompleteCodeSubmissionReceived.cs rename to Microsoft.DotNet.Interactive/Events/IncompleteCodeSubmissionReceived.cs index 943652b84..07247090c 100644 --- a/WorkspaceServer/Kernel/IncompleteCodeSubmissionReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/IncompleteCodeSubmissionReceived.cs @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +using Microsoft.DotNet.Interactive.Commands; + +namespace Microsoft.DotNet.Interactive.Events { public class IncompleteCodeSubmissionReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/KernelEventBase.cs b/Microsoft.DotNet.Interactive/Events/KernelEventBase.cs similarity index 85% rename from WorkspaceServer/Kernel/KernelEventBase.cs rename to Microsoft.DotNet.Interactive/Events/KernelEventBase.cs index de72ad54d..29965702e 100644 --- a/WorkspaceServer/Kernel/KernelEventBase.cs +++ b/Microsoft.DotNet.Interactive/Events/KernelEventBase.cs @@ -2,8 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public abstract class KernelEventBase : IKernelEvent { diff --git a/WorkspaceServer/Kernel/NuGetPackageAdded.cs b/Microsoft.DotNet.Interactive/Events/NuGetPackageAdded.cs similarity index 90% rename from WorkspaceServer/Kernel/NuGetPackageAdded.cs rename to Microsoft.DotNet.Interactive/Events/NuGetPackageAdded.cs index b81fa373e..ec74c4aff 100644 --- a/WorkspaceServer/Kernel/NuGetPackageAdded.cs +++ b/Microsoft.DotNet.Interactive/Events/NuGetPackageAdded.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class NuGetPackageAdded : KernelEventBase { diff --git a/WorkspaceServer/Kernel/SignatureHelpReceived.cs b/Microsoft.DotNet.Interactive/Events/SignatureHelpReceived.cs similarity index 79% rename from WorkspaceServer/Kernel/SignatureHelpReceived.cs rename to Microsoft.DotNet.Interactive/Events/SignatureHelpReceived.cs index 9b05042e3..1d75d20ac 100644 --- a/WorkspaceServer/Kernel/SignatureHelpReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/SignatureHelpReceived.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class SignatureHelpReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/StandardErrorReceived.cs b/Microsoft.DotNet.Interactive/Events/StandardErrorReceived.cs similarity index 89% rename from WorkspaceServer/Kernel/StandardErrorReceived.cs rename to Microsoft.DotNet.Interactive/Events/StandardErrorReceived.cs index 4e60939c2..9db0101e5 100644 --- a/WorkspaceServer/Kernel/StandardErrorReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/StandardErrorReceived.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class StandardErrorReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/StandardInputReceived.cs b/Microsoft.DotNet.Interactive/Events/StandardInputReceived.cs similarity index 89% rename from WorkspaceServer/Kernel/StandardInputReceived.cs rename to Microsoft.DotNet.Interactive/Events/StandardInputReceived.cs index 3b22a7870..00e7fb82c 100644 --- a/WorkspaceServer/Kernel/StandardInputReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/StandardInputReceived.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class StandardInputReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/StandardOutputReceived.cs b/Microsoft.DotNet.Interactive/Events/StandardOutputReceived.cs similarity index 89% rename from WorkspaceServer/Kernel/StandardOutputReceived.cs rename to Microsoft.DotNet.Interactive/Events/StandardOutputReceived.cs index d1474cdcd..df770ba6c 100644 --- a/WorkspaceServer/Kernel/StandardOutputReceived.cs +++ b/Microsoft.DotNet.Interactive/Events/StandardOutputReceived.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class StandardOutputReceived : KernelEventBase { diff --git a/WorkspaceServer/Kernel/Started.cs b/Microsoft.DotNet.Interactive/Events/Started.cs similarity index 83% rename from WorkspaceServer/Kernel/Started.cs rename to Microsoft.DotNet.Interactive/Events/Started.cs index edb949e33..ebfc42a3b 100644 --- a/WorkspaceServer/Kernel/Started.cs +++ b/Microsoft.DotNet.Interactive/Events/Started.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class Started : KernelEventBase { diff --git a/WorkspaceServer/Kernel/Stopped.cs b/Microsoft.DotNet.Interactive/Events/Stopped.cs similarity index 83% rename from WorkspaceServer/Kernel/Stopped.cs rename to Microsoft.DotNet.Interactive/Events/Stopped.cs index 821b34fb2..b38ac36f6 100644 --- a/WorkspaceServer/Kernel/Stopped.cs +++ b/Microsoft.DotNet.Interactive/Events/Stopped.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class Stopped : KernelEventBase { diff --git a/WorkspaceServer/Kernel/ValueProduced.cs b/Microsoft.DotNet.Interactive/Events/ValueProduced.cs similarity index 88% rename from WorkspaceServer/Kernel/ValueProduced.cs rename to Microsoft.DotNet.Interactive/Events/ValueProduced.cs index 4ccd136c0..fe7ce0a6f 100644 --- a/WorkspaceServer/Kernel/ValueProduced.cs +++ b/Microsoft.DotNet.Interactive/Events/ValueProduced.cs @@ -2,8 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive.Events { public class ValueProduced : KernelEventBase { diff --git a/WorkspaceServer/Kernel/FormattedValue.cs b/Microsoft.DotNet.Interactive/FormattedValue.cs similarity index 91% rename from WorkspaceServer/Kernel/FormattedValue.cs rename to Microsoft.DotNet.Interactive/FormattedValue.cs index a4dc2e0e4..e71da82ca 100644 --- a/WorkspaceServer/Kernel/FormattedValue.cs +++ b/Microsoft.DotNet.Interactive/FormattedValue.cs @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class FormattedValue { diff --git a/WorkspaceServer/Kernel/IKernel.cs b/Microsoft.DotNet.Interactive/IKernel.cs similarity index 79% rename from WorkspaceServer/Kernel/IKernel.cs rename to Microsoft.DotNet.Interactive/IKernel.cs index a9a6fc4c8..cb3680fae 100644 --- a/WorkspaceServer/Kernel/IKernel.cs +++ b/Microsoft.DotNet.Interactive/IKernel.cs @@ -4,8 +4,10 @@ using System; using System.Threading; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Commands; +using Microsoft.DotNet.Interactive.Events; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public interface IKernel : IDisposable { diff --git a/WorkspaceServer/Kernel/IKernelCommandResult.cs b/Microsoft.DotNet.Interactive/IKernelCommandResult.cs similarity index 78% rename from WorkspaceServer/Kernel/IKernelCommandResult.cs rename to Microsoft.DotNet.Interactive/IKernelCommandResult.cs index 054160203..70c1fc612 100644 --- a/WorkspaceServer/Kernel/IKernelCommandResult.cs +++ b/Microsoft.DotNet.Interactive/IKernelCommandResult.cs @@ -2,8 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using Microsoft.DotNet.Interactive.Events; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public interface IKernelCommandResult { diff --git a/WorkspaceServer/Kernel/IKernelExtension.cs b/Microsoft.DotNet.Interactive/IKernelExtension.cs similarity index 88% rename from WorkspaceServer/Kernel/IKernelExtension.cs rename to Microsoft.DotNet.Interactive/IKernelExtension.cs index 6ef0e2d5e..96cf922bb 100644 --- a/WorkspaceServer/Kernel/IKernelExtension.cs +++ b/Microsoft.DotNet.Interactive/IKernelExtension.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public interface IKernelExtension { diff --git a/WorkspaceServer/Kernel/KernelBase.cs b/Microsoft.DotNet.Interactive/KernelBase.cs similarity index 98% rename from WorkspaceServer/Kernel/KernelBase.cs rename to Microsoft.DotNet.Interactive/KernelBase.cs index c8ac003a3..e2a832929 100644 --- a/WorkspaceServer/Kernel/KernelBase.cs +++ b/Microsoft.DotNet.Interactive/KernelBase.cs @@ -13,8 +13,10 @@ using System.Reflection; using System.Threading; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Commands; +using Microsoft.DotNet.Interactive.Events; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public abstract class KernelBase : IKernel { diff --git a/WorkspaceServer/Kernel/KernelCommandInvocation.cs b/Microsoft.DotNet.Interactive/KernelCommandInvocation.cs similarity index 88% rename from WorkspaceServer/Kernel/KernelCommandInvocation.cs rename to Microsoft.DotNet.Interactive/KernelCommandInvocation.cs index fd8fa2e58..41008cc66 100644 --- a/WorkspaceServer/Kernel/KernelCommandInvocation.cs +++ b/Microsoft.DotNet.Interactive/KernelCommandInvocation.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public delegate Task KernelCommandInvocation( KernelInvocationContext context); diff --git a/WorkspaceServer/Kernel/KernelCommandNotSupportedException.cs b/Microsoft.DotNet.Interactive/KernelCommandNotSupportedException.cs similarity index 84% rename from WorkspaceServer/Kernel/KernelCommandNotSupportedException.cs rename to Microsoft.DotNet.Interactive/KernelCommandNotSupportedException.cs index ad913c146..67fc6f2af 100644 --- a/WorkspaceServer/Kernel/KernelCommandNotSupportedException.cs +++ b/Microsoft.DotNet.Interactive/KernelCommandNotSupportedException.cs @@ -2,8 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class KernelCommandNotSupportedException : Exception { diff --git a/WorkspaceServer/Kernel/KernelCommandPipeline.cs b/Microsoft.DotNet.Interactive/KernelCommandPipeline.cs similarity index 95% rename from WorkspaceServer/Kernel/KernelCommandPipeline.cs rename to Microsoft.DotNet.Interactive/KernelCommandPipeline.cs index 1972bc38a..79f81dee0 100644 --- a/WorkspaceServer/Kernel/KernelCommandPipeline.cs +++ b/Microsoft.DotNet.Interactive/KernelCommandPipeline.cs @@ -5,8 +5,9 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class KernelCommandPipeline { diff --git a/WorkspaceServer/Kernel/KernelCommandPipelineMiddleware.cs b/Microsoft.DotNet.Interactive/KernelCommandPipelineMiddleware.cs similarity index 82% rename from WorkspaceServer/Kernel/KernelCommandPipelineMiddleware.cs rename to Microsoft.DotNet.Interactive/KernelCommandPipelineMiddleware.cs index 2871d55f2..3afc0e53b 100644 --- a/WorkspaceServer/Kernel/KernelCommandPipelineMiddleware.cs +++ b/Microsoft.DotNet.Interactive/KernelCommandPipelineMiddleware.cs @@ -2,8 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public delegate Task KernelCommandPipelineMiddleware( IKernelCommand command, diff --git a/WorkspaceServer/Kernel/KernelCommandResult.cs b/Microsoft.DotNet.Interactive/KernelCommandResult.cs similarity index 86% rename from WorkspaceServer/Kernel/KernelCommandResult.cs rename to Microsoft.DotNet.Interactive/KernelCommandResult.cs index 93980b677..761bbdf37 100644 --- a/WorkspaceServer/Kernel/KernelCommandResult.cs +++ b/Microsoft.DotNet.Interactive/KernelCommandResult.cs @@ -2,8 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using Microsoft.DotNet.Interactive.Events; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { internal class KernelCommandResult : IKernelCommandResult { diff --git a/WorkspaceServer/Kernel/KernelException.cs b/Microsoft.DotNet.Interactive/KernelException.cs similarity index 79% rename from WorkspaceServer/Kernel/KernelException.cs rename to Microsoft.DotNet.Interactive/KernelException.cs index 164f5b7cb..86682968e 100644 --- a/WorkspaceServer/Kernel/KernelException.cs +++ b/Microsoft.DotNet.Interactive/KernelException.cs @@ -3,14 +3,10 @@ using System; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class KernelException : Exception { - public KernelException() - { - - } public KernelException(string message) : base(message) { diff --git a/WorkspaceServer/Kernel/KernelExtensions.cs b/Microsoft.DotNet.Interactive/KernelExtensions.cs similarity index 95% rename from WorkspaceServer/Kernel/KernelExtensions.cs rename to Microsoft.DotNet.Interactive/KernelExtensions.cs index f609c537e..8992afacb 100644 --- a/WorkspaceServer/Kernel/KernelExtensions.cs +++ b/Microsoft.DotNet.Interactive/KernelExtensions.cs @@ -8,9 +8,10 @@ using System.IO; using System.Threading; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Commands; using Pocket; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public static class KernelExtensions { diff --git a/WorkspaceServer/Kernel/KernelInvocationContext.cs b/Microsoft.DotNet.Interactive/KernelInvocationContext.cs similarity index 94% rename from WorkspaceServer/Kernel/KernelInvocationContext.cs rename to Microsoft.DotNet.Interactive/KernelInvocationContext.cs index bc775c9f8..ef78f6e26 100644 --- a/WorkspaceServer/Kernel/KernelInvocationContext.cs +++ b/Microsoft.DotNet.Interactive/KernelInvocationContext.cs @@ -4,8 +4,9 @@ using System; using System.Reactive.Subjects; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Events; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class KernelInvocationContext : IObserver { diff --git a/WorkspaceServer/Kernel/KernelPipelineContext.cs b/Microsoft.DotNet.Interactive/KernelPipelineContext.cs similarity index 95% rename from WorkspaceServer/Kernel/KernelPipelineContext.cs rename to Microsoft.DotNet.Interactive/KernelPipelineContext.cs index bda81cbbe..0680b6a8a 100644 --- a/WorkspaceServer/Kernel/KernelPipelineContext.cs +++ b/Microsoft.DotNet.Interactive/KernelPipelineContext.cs @@ -3,11 +3,12 @@ using System; using System.Collections.Generic; -using System.Reactive.Linq; using System.Linq; +using System.Reactive.Linq; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Events; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class KernelPipelineContext { diff --git a/WorkspaceServer/Kernel/KernelPipelineContinuation.cs b/Microsoft.DotNet.Interactive/KernelPipelineContinuation.cs similarity index 80% rename from WorkspaceServer/Kernel/KernelPipelineContinuation.cs rename to Microsoft.DotNet.Interactive/KernelPipelineContinuation.cs index 6da3787bd..be9a6f5e0 100644 --- a/WorkspaceServer/Kernel/KernelPipelineContinuation.cs +++ b/Microsoft.DotNet.Interactive/KernelPipelineContinuation.cs @@ -2,8 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Threading.Tasks; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public delegate Task KernelPipelineContinuation( IKernelCommand command, diff --git a/WorkspaceServer/Kernel/LoadExtension.cs b/Microsoft.DotNet.Interactive/LoadExtension.cs similarity index 85% rename from WorkspaceServer/Kernel/LoadExtension.cs rename to Microsoft.DotNet.Interactive/LoadExtension.cs index 60426b1c2..b3367159e 100644 --- a/WorkspaceServer/Kernel/LoadExtension.cs +++ b/Microsoft.DotNet.Interactive/LoadExtension.cs @@ -3,8 +3,9 @@ using System; using System.IO; +using Microsoft.DotNet.Interactive.Commands; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class LoadExtension : KernelCommandBase { diff --git a/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj new file mode 100644 index 000000000..8e8dbf70c --- /dev/null +++ b/Microsoft.DotNet.Interactive/Microsoft.DotNet.Interactive.csproj @@ -0,0 +1,17 @@ + + + + netstandard2.0 + $(NoWarn);8002 + preview + + + + + + + all + + + + diff --git a/WorkspaceServer/Kernel/NoSuitableKernelException.cs b/Microsoft.DotNet.Interactive/NoSuitableKernelException.cs similarity index 87% rename from WorkspaceServer/Kernel/NoSuitableKernelException.cs rename to Microsoft.DotNet.Interactive/NoSuitableKernelException.cs index 5cd075892..5b7252e84 100644 --- a/WorkspaceServer/Kernel/NoSuitableKernelException.cs +++ b/Microsoft.DotNet.Interactive/NoSuitableKernelException.cs @@ -3,7 +3,7 @@ using System; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class NoSuitableKernelException : Exception { diff --git a/WorkspaceServer/Kernel/NugetPackageReference.cs b/Microsoft.DotNet.Interactive/NugetPackageReference.cs similarity index 97% rename from WorkspaceServer/Kernel/NugetPackageReference.cs rename to Microsoft.DotNet.Interactive/NugetPackageReference.cs index 5bcd8c8d4..e6ad0c8d1 100644 --- a/WorkspaceServer/Kernel/NugetPackageReference.cs +++ b/Microsoft.DotNet.Interactive/NugetPackageReference.cs @@ -4,7 +4,7 @@ using System; using System.Text.RegularExpressions; -namespace WorkspaceServer.Kernel +namespace Microsoft.DotNet.Interactive { public class NugetPackageReference { diff --git a/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs b/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs index 164367430..4c6fe3bd2 100644 --- a/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs +++ b/WorkspaceServer.Tests/Kernel/CSharpKernelTests.cs @@ -7,6 +7,9 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Scripting; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Commands; +using Microsoft.DotNet.Interactive.Events; using MLS.Agent.Tools; using Newtonsoft.Json; using Pocket; @@ -53,7 +56,7 @@ public async Task it_returns_the_result_of_a_non_null_expression() } [Fact] - public async Task when_it_throws_exception_after_a_value_was_produced_thne_only_the_error_is_returned() + public async Task when_it_throws_exception_after_a_value_was_produced_then_only_the_error_is_returned() { var kernel = await CreateKernelAsync(); @@ -300,7 +303,7 @@ public async Task The_extend_directive_can_be_used_to_load_a_kernel_extension() var extensionDir = Create.EmptyWorkspace() .Directory; - var workspaceServerDllPath = typeof(IKernelExtension).Assembly.Location; + var microsoftDotNetInteractiveDllPath = typeof(IKernelExtension).Assembly.Location; var dirAccessor = new InMemoryDirectoryAccessor(extensionDir) { @@ -308,7 +311,8 @@ public async Task The_extend_directive_can_be_used_to_load_a_kernel_extension() using System; using System.Reflection; using System.Threading.Tasks; -using WorkspaceServer.Kernel; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Commands; public class TestKernelExtension : IKernelExtension {{ @@ -327,8 +331,8 @@ public async Task OnLoadAsync(IKernel kernel) - - {workspaceServerDllPath} + + {microsoftDotNetInteractiveDllPath} diff --git a/WorkspaceServer.Tests/Kernel/CompositeKernelTests.cs b/WorkspaceServer.Tests/Kernel/CompositeKernelTests.cs index 1cb038920..4c3b9abce 100644 --- a/WorkspaceServer.Tests/Kernel/CompositeKernelTests.cs +++ b/WorkspaceServer.Tests/Kernel/CompositeKernelTests.cs @@ -7,6 +7,9 @@ using FluentAssertions; using System.Linq; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Commands; +using Microsoft.DotNet.Interactive.Events; using WorkspaceServer.Kernel; using Xunit; using Xunit.Abstractions; diff --git a/WorkspaceServer.Tests/Kernel/KernelTests.cs b/WorkspaceServer.Tests/Kernel/KernelTests.cs index 9f62062a8..0f0b1c6d4 100644 --- a/WorkspaceServer.Tests/Kernel/KernelTests.cs +++ b/WorkspaceServer.Tests/Kernel/KernelTests.cs @@ -5,6 +5,9 @@ using System.Collections.Generic; using System.Reactive.Disposables; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Commands; +using Microsoft.DotNet.Interactive.Events; using WorkspaceServer.Kernel; namespace WorkspaceServer.Tests.Kernel diff --git a/WorkspaceServer.Tests/Kernel/ObservableRunnerTests.cs b/WorkspaceServer.Tests/Kernel/ObservableRunnerTests.cs index 7a36be377..4f5cd59fb 100644 --- a/WorkspaceServer.Tests/Kernel/ObservableRunnerTests.cs +++ b/WorkspaceServer.Tests/Kernel/ObservableRunnerTests.cs @@ -11,6 +11,8 @@ using System.Threading.Tasks; using FluentAssertions; using FluentAssertions.Extensions; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Events; using WorkspaceServer.Kernel; using Xunit; diff --git a/WorkspaceServer.Tests/Kernel/PackageReferenceTests.cs b/WorkspaceServer.Tests/Kernel/PackageReferenceTests.cs index 7f26ee61d..e89a38bfb 100644 --- a/WorkspaceServer.Tests/Kernel/PackageReferenceTests.cs +++ b/WorkspaceServer.Tests/Kernel/PackageReferenceTests.cs @@ -3,6 +3,7 @@ using System; using FluentAssertions; +using Microsoft.DotNet.Interactive; using WorkspaceServer.Kernel; using Xunit; diff --git a/WorkspaceServer.Tests/ObservableProcessTests.cs b/WorkspaceServer.Tests/ObservableProcessTests.cs index b733d0b2e..848412fa1 100644 --- a/WorkspaceServer.Tests/ObservableProcessTests.cs +++ b/WorkspaceServer.Tests/ObservableProcessTests.cs @@ -8,6 +8,8 @@ using System.Threading.Tasks; using FluentAssertions; using FluentAssertions.Extensions; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Events; using WorkspaceServer.Kernel; using WorkspaceServer.Tests.Kernel; using Xunit; diff --git a/WorkspaceServer/IObservableRunner.cs b/WorkspaceServer/IObservableRunner.cs index fb84b01a5..1ce76b10f 100644 --- a/WorkspaceServer/IObservableRunner.cs +++ b/WorkspaceServer/IObservableRunner.cs @@ -3,6 +3,8 @@ using System; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Events; using WorkspaceServer.Kernel; namespace WorkspaceServer diff --git a/WorkspaceServer/Kernel/CSharpKernel.cs b/WorkspaceServer/Kernel/CSharpKernel.cs index 0901d8801..4505563e9 100644 --- a/WorkspaceServer/Kernel/CSharpKernel.cs +++ b/WorkspaceServer/Kernel/CSharpKernel.cs @@ -15,9 +15,13 @@ using Microsoft.CodeAnalysis.CSharp.Scripting; using Microsoft.CodeAnalysis.Recommendations; using Microsoft.CodeAnalysis.Scripting; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Commands; +using Microsoft.DotNet.Interactive.Events; using WorkspaceServer.LanguageServices; using Microsoft.DotNet.Interactive.Rendering; using WorkspaceServer.Servers.Scripting; +using CompletionItem = Microsoft.DotNet.Interactive.CompletionItem; using Task = System.Threading.Tasks.Task; namespace WorkspaceServer.Kernel @@ -80,7 +84,7 @@ private void SetupScriptOptions() return (true, code); } - protected internal override async Task HandleAsync( + protected override async Task HandleAsync( IKernelCommand command, KernelPipelineContext context) { diff --git a/WorkspaceServer/Kernel/CSharpKernelExtensions.cs b/WorkspaceServer/Kernel/CSharpKernelExtensions.cs index 41c0eaced..0495f7402 100644 --- a/WorkspaceServer/Kernel/CSharpKernelExtensions.cs +++ b/WorkspaceServer/Kernel/CSharpKernelExtensions.cs @@ -3,6 +3,8 @@ using System.CommandLine; using System.CommandLine.Invocation; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Events; namespace WorkspaceServer.Kernel { diff --git a/WorkspaceServer/Kernel/IRendering.cs b/WorkspaceServer/Kernel/IRendering.cs deleted file mode 100644 index b266dbe44..000000000 --- a/WorkspaceServer/Kernel/IRendering.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace WorkspaceServer.Kernel -{ - public interface IRendering - { - string MimeType { get; } - - object Content { get; } - } -} \ No newline at end of file diff --git a/WorkspaceServer/Kernel/ProtocolObjectExtensions.cs b/WorkspaceServer/Kernel/ProtocolObjectExtensions.cs index 419f1eea3..aaef48e69 100644 --- a/WorkspaceServer/Kernel/ProtocolObjectExtensions.cs +++ b/WorkspaceServer/Kernel/ProtocolObjectExtensions.cs @@ -2,6 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Events; + namespace WorkspaceServer.Kernel { internal static class ProtocolObjectExtensions{ diff --git a/WorkspaceServer/Kernel/RenderingEngineException.cs b/WorkspaceServer/Kernel/RenderingEngineException.cs deleted file mode 100644 index 8696f7171..000000000 --- a/WorkspaceServer/Kernel/RenderingEngineException.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; - -namespace WorkspaceServer.Kernel -{ - public class RenderingEngineException : Exception - { - public object RenderingSource { get; } - - public RenderingEngineException(Exception exception, object renderingRenderingSource) : base("Rendering Failed",exception) - { - RenderingSource = renderingRenderingSource; - } - } -} \ No newline at end of file diff --git a/WorkspaceServer/ProcessRunner.cs b/WorkspaceServer/ProcessRunner.cs index de947c835..beaa7366e 100644 --- a/WorkspaceServer/ProcessRunner.cs +++ b/WorkspaceServer/ProcessRunner.cs @@ -9,6 +9,8 @@ using System.Text; using System.Threading; using System.Threading.Tasks; +using Microsoft.DotNet.Interactive; +using Microsoft.DotNet.Interactive.Events; using WorkspaceServer.Kernel; namespace WorkspaceServer diff --git a/WorkspaceServer/WorkspaceServer.csproj b/WorkspaceServer/WorkspaceServer.csproj index 004944eaf..5ceb5f7ba 100644 --- a/WorkspaceServer/WorkspaceServer.csproj +++ b/WorkspaceServer/WorkspaceServer.csproj @@ -101,6 +101,7 @@ +