From 35125787b932d550d05eeba77f6d5314d5fe175d Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 17 Jul 2019 14:15:31 +0100 Subject: [PATCH 01/18] adding handler and tests for completion requests --- .../CompleteRequestHandlerTests.cs | 15 +++++- .../CompleteRequestHandler.cs | 46 +++++++++++++++++-- .../Kernel/CompletionRequestCompleted.cs | 12 +++++ ...ceived.cs => CompletionRequestReceived.cs} | 6 +-- WorkspaceServer/Kernel/RequestCompletion.cs | 16 +++++++ 5 files changed, 85 insertions(+), 10 deletions(-) create mode 100644 WorkspaceServer/Kernel/CompletionRequestCompleted.cs rename WorkspaceServer/Kernel/{CompletionReceived.cs => CompletionRequestReceived.cs} (63%) diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs b/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs index ee2873563..d995b5bd5 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs +++ b/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs @@ -29,7 +29,7 @@ public CompleteRequestHandlerTests() } [Fact] - public void cannot_handle_requests_that_are_not_executeRequest() + public void cannot_handle_requests_that_are_not_completeRequest() { var kernel = new CSharpRepl(); var handler = new CompleteRequestHandler(kernel); @@ -37,5 +37,18 @@ public void cannot_handle_requests_that_are_not_executeRequest() Func messageHandling = () => handler.Handle(new JupyterRequestContext(_serverChannel, _ioPubChannel, request, _kernelStatus)); messageHandling.Should().ThrowExactly(); } + + [Fact] + public void send_completeReply_on_completeRequest() + { + var kernel = new CSharpRepl(); + var handler = new CompleteRequestHandler(kernel); + var request = Message.Create(new CompleteRequest("Conso",4 ), null); + Func messageHandling = () => handler.Handle(new JupyterRequestContext(_serverChannel, _ioPubChannel, request, _kernelStatus)); + + _serverRecordingSocket.DecodedMessages + .Should().Contain(message => + message.Contains(MessageTypeValues.CompleteReply)); + } } } \ No newline at end of file diff --git a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs index 3685fd5cc..70d41521e 100644 --- a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs +++ b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs @@ -2,7 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; -using System.Reactive.Disposables; +using System.Collections.Concurrent; using System.Threading.Tasks; using Microsoft.DotNet.Try.Jupyter.Protocol; using WorkspaceServer.Kernel; @@ -18,15 +18,51 @@ public CompleteRequestHandler(IKernel kernel) : base(kernel) } - public Task Handle(JupyterRequestContext context) + public async Task Handle(JupyterRequestContext context) { var completeRequest = GetRequest(context); context.RequestHandlerStatus.SetAsBusy(); - context.RequestHandlerStatus.SetAsIdle(); - throw new NotImplementedException(); + + var command = new RequestCompletion(completeRequest.Code, completeRequest.CursorPosition); + + var openRequest = new OpenRequest(context, completeRequest, 0, null); + + OpenRequests[command] = openRequest; + + var kernelResult = await Kernel.SendAsync(command); + openRequest.AddDisposable(kernelResult.KernelEvents.Subscribe(OnKernelResultEvent)); + + } + + void OnKernelResultEvent(IKernelEvent value) + { + switch (value) + { + + case CompletionRequestCompleted completionRequestCompleted: + OnCompletionRequestCompleted(completionRequestCompleted, OpenRequests); + break; + case CompletionRequestReceived _: + break; + default: + throw new NotImplementedException(); + } } - + private static void OnCompletionRequestCompleted(CompletionRequestCompleted completionRequestCompleted, ConcurrentDictionary openRequests) + { + openRequests.TryGetValue(completionRequestCompleted.Command, out var openRequest); + if (openRequest == null) + { + return; + } + + throw new NotImplementedException(); + + openRequest.Context.RequestHandlerStatus.SetAsIdle(); + openRequest.Dispose(); + + } } } \ No newline at end of file diff --git a/WorkspaceServer/Kernel/CompletionRequestCompleted.cs b/WorkspaceServer/Kernel/CompletionRequestCompleted.cs new file mode 100644 index 000000000..b943e7280 --- /dev/null +++ b/WorkspaceServer/Kernel/CompletionRequestCompleted.cs @@ -0,0 +1,12 @@ +// 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 class CompletionRequestCompleted : KernelEventBase + { + public CompletionRequestCompleted(IKernelCommand command) : base(command) + { + } + } +} \ No newline at end of file diff --git a/WorkspaceServer/Kernel/CompletionReceived.cs b/WorkspaceServer/Kernel/CompletionRequestReceived.cs similarity index 63% rename from WorkspaceServer/Kernel/CompletionReceived.cs rename to WorkspaceServer/Kernel/CompletionRequestReceived.cs index 488b23fc1..7e565bb4e 100644 --- a/WorkspaceServer/Kernel/CompletionReceived.cs +++ b/WorkspaceServer/Kernel/CompletionRequestReceived.cs @@ -1,13 +1,11 @@ // 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 CompletionReceived : KernelEventBase + public class CompletionRequestReceived : KernelEventBase { - public CompletionReceived(IKernelCommand command) : base(command) + public CompletionRequestReceived(IKernelCommand command) : base(command) { } } diff --git a/WorkspaceServer/Kernel/RequestCompletion.cs b/WorkspaceServer/Kernel/RequestCompletion.cs index 98ec176e9..fd1789df6 100644 --- a/WorkspaceServer/Kernel/RequestCompletion.cs +++ b/WorkspaceServer/Kernel/RequestCompletion.cs @@ -1,9 +1,25 @@ // 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. +// 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 RequestCompletion : KernelCommandBase { + public RequestCompletion(string code, int cursorPosition, string targetKernelName = null) + { + Code = code ?? throw new ArgumentNullException(nameof(code)); + CursorPosition = cursorPosition < 0 ? throw new ArgumentOutOfRangeException(nameof(cursorPosition), "cannot be negative") : cursorPosition; + TargetKernelName = targetKernelName; + } + + public string Code { get; set; } + + public int CursorPosition { get; set; } + + public string TargetKernelName { get; set; } } } \ No newline at end of file From 87dd6b4fb9b37ea797721f4647ae9dff4985596d Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 17 Jul 2019 19:17:36 +0100 Subject: [PATCH 02/18] can generate completion list --- .../Kernel/CSharpReplTests.cs | 21 +++- WorkspaceServer/Kernel/CSharpRepl.cs | 96 +++++++++++++++++++ .../Kernel/CompletionRequestCompleted.cs | 7 +- 3 files changed, 122 insertions(+), 2 deletions(-) diff --git a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs index a91d30632..5a54dbc2c 100644 --- a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs +++ b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Scripting; +using Microsoft.DotNet.Try.Jupyter.Protocol; using Newtonsoft.Json; using Recipes; using WorkspaceServer.Kernel; @@ -62,7 +63,7 @@ public async Task when_it_throws_exception_after_a_value_was_produced_thne_only_ var lastCodeSubmissionPosition = KernelEvents .Select((e, pos) => (e, pos)) - .Last(t=> t.e is CodeSubmissionReceived).pos; + .Last(t => t.e is CodeSubmissionReceived).pos; var lastValueProducedPosition = KernelEvents .Select((e, pos) => (e, pos)) @@ -226,5 +227,23 @@ await kernel.SendAsync( .Should() .Be(new { value = "hello" }.ToJson()); } + + [Fact] + public async Task it_return_completion_list_for_types() + { + + var repl = await CreateKernelAsync(); + + await repl.SendAsync(new RequestCompletion("System.Console.", 15, "csharp")); + + KernelEvents.Should() + .ContainSingle(e => e is CompletionRequestReceived); + + KernelEvents.Single(e => e is CompletionRequestCompleted) + .As() + .CompletionList + .Should() + .Contain(i => i.DisplayText == "ReadLine"); + } } } \ No newline at end of file diff --git a/WorkspaceServer/Kernel/CSharpRepl.cs b/WorkspaceServer/Kernel/CSharpRepl.cs index 85b188d4e..f2c8eacf0 100644 --- a/WorkspaceServer/Kernel/CSharpRepl.cs +++ b/WorkspaceServer/Kernel/CSharpRepl.cs @@ -3,14 +3,22 @@ using System; using System.Collections.Generic; +using System.Collections.Immutable; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Completion; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Scripting; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Host.Mef; +using Microsoft.CodeAnalysis.Recommendations; using Microsoft.CodeAnalysis.Scripting; +using Microsoft.CodeAnalysis.Text; +using Microsoft.DotNet.Try.Protocol; +using WorkspaceServer.LanguageServices; namespace WorkspaceServer.Kernel { @@ -78,7 +86,13 @@ protected internal override async Task HandleAsync( { await HandleSubmitCode(submitCode, invocationContext); }); + break; + case RequestCompletion requestCompletion: + context.OnExecute(async invocationContext => + { + await HandleRequestCompletion(requestCompletion, invocationContext, _scriptState); + }); break; } } @@ -149,6 +163,88 @@ private async Task HandleSubmitCode( } } + private async Task HandleRequestCompletion( + RequestCompletion requestCompletion, + KernelInvocationContext context, + ScriptState scriptState) + { + var completionRequestReceived = new CompletionRequestReceived(requestCompletion); + + context.OnNext(completionRequestReceived); + + var completionList = + await GetCompletionList(requestCompletion.Code, requestCompletion.CursorPosition, scriptState); + + context.OnNext(new CompletionRequestCompleted(completionList, requestCompletion)); + } + + private async Task GetCompletionList(string code, int cursorPosition, ScriptState scriptState) + { + var projectId = ProjectId.CreateNewId("ScriptProject"); + var workspace = new AdhocWorkspace(MefHostServices.DefaultHost); + + var metadataReferences = ImmutableArray.Empty; + + var forcedState = false; + if (scriptState == null) + { + scriptState = await CSharpScript.RunAsync("", ScriptOptions); + forcedState = true; + } + + var compilation = scriptState.Script.GetCompilation(); + metadataReferences = metadataReferences.AddRange(compilation.References); + + var buffer = new StringBuilder(forcedState ? string.Empty : (scriptState.Script.Code ?? string.Empty)); + buffer.AppendLine(code); + var fullScriptCode = buffer.ToString(); + var offset = fullScriptCode.LastIndexOf(code, StringComparison.InvariantCulture); + var absolutePosition = Math.Max(offset,0) + cursorPosition; + + var compilationOptions = compilation.Options; + + + var projectInfo = ProjectInfo.Create( + projectId, + version: VersionStamp.Create(), + name: "ScriptProject", + assemblyName: "ScriptProject", + language: LanguageNames.CSharp, + compilationOptions: compilationOptions, + metadataReferences: metadataReferences); + + workspace.AddProject(projectInfo); + + var documentId = DocumentId.CreateNewId(projectId, "ScriptDocument"); + + var documentInfo = DocumentInfo.Create(documentId, + name: "ScriptDocument", + sourceCodeKind: SourceCodeKind.Script); + + workspace.AddDocument(documentInfo); + + var document = workspace.CurrentSolution.GetDocument(documentId); + document = document.WithText(SourceText.From(fullScriptCode)); + var service = CompletionService.GetService(document); + + var completionList = await service.GetCompletionsAsync(document, absolutePosition); + var semanticModel = await document.GetSemanticModelAsync(); + var symbols = await Recommender.GetRecommendedSymbolsAtPositionAsync(semanticModel, absolutePosition, document.Project.Solution.Workspace); + + var symbolToSymbolKey = new Dictionary<(string, int), ISymbol>(); + foreach (var symbol in symbols) + { + var key = (symbol.Name, (int)symbol.Kind); + if (!symbolToSymbolKey.ContainsKey(key)) + { + symbolToSymbolKey[key] = symbol; + } + } + var items = completionList.Items.Select(item => item.ToModel(symbolToSymbolKey, document)).ToArray(); + + return new CompletionResult(items); + } + private bool HasReturnValue => _scriptState != null && (bool) _hasReturnValueMethod.Invoke(_scriptState.Script, null); diff --git a/WorkspaceServer/Kernel/CompletionRequestCompleted.cs b/WorkspaceServer/Kernel/CompletionRequestCompleted.cs index b943e7280..c2b8775ee 100644 --- a/WorkspaceServer/Kernel/CompletionRequestCompleted.cs +++ b/WorkspaceServer/Kernel/CompletionRequestCompleted.cs @@ -1,12 +1,17 @@ // 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 Microsoft.DotNet.Try.Protocol; + namespace WorkspaceServer.Kernel { public class CompletionRequestCompleted : KernelEventBase { - public CompletionRequestCompleted(IKernelCommand command) : base(command) + public CompletionResult CompletionList { get; } + + public CompletionRequestCompleted(CompletionResult completionList, IKernelCommand command) : base(command) { + CompletionList = completionList; } } } \ No newline at end of file From 64d428a4ef146a457ae7315e276b44fb7b748805 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 17 Jul 2019 19:20:31 +0100 Subject: [PATCH 03/18] completion after code evaluation --- .../Kernel/CSharpReplTests.cs | 20 +++++++++++++++++++ WorkspaceServer/Kernel/CSharpRepl.cs | 5 +++-- .../Kernel/CompletionRequestCompleted.cs | 8 +++++--- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs index 5a54dbc2c..4aa1f7f84 100644 --- a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs +++ b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs @@ -245,5 +245,25 @@ public async Task it_return_completion_list_for_types() .Should() .Contain(i => i.DisplayText == "ReadLine"); } + + [Fact] + public async Task it_return_completion_list_for_previously_declared_variables() + { + + var repl = await CreateKernelAsync(); + + await repl.SendAsync( + new SubmitCode($"var alpha = new Random();")); + await repl.SendAsync(new RequestCompletion("al", 2, "csharp")); + + KernelEvents.Should() + .ContainSingle(e => e is CompletionRequestReceived); + + KernelEvents.Single(e => e is CompletionRequestCompleted) + .As() + .CompletionList + .Should() + .Contain(i => i.DisplayText == "alpha"); + } } } \ No newline at end of file diff --git a/WorkspaceServer/Kernel/CSharpRepl.cs b/WorkspaceServer/Kernel/CSharpRepl.cs index f2c8eacf0..557cbe579 100644 --- a/WorkspaceServer/Kernel/CSharpRepl.cs +++ b/WorkspaceServer/Kernel/CSharpRepl.cs @@ -19,6 +19,7 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.DotNet.Try.Protocol; using WorkspaceServer.LanguageServices; +using CompletionItem = Microsoft.DotNet.Try.Protocol.CompletionItem; namespace WorkspaceServer.Kernel { @@ -178,7 +179,7 @@ private async Task HandleRequestCompletion( context.OnNext(new CompletionRequestCompleted(completionList, requestCompletion)); } - private async Task GetCompletionList(string code, int cursorPosition, ScriptState scriptState) + private async Task> GetCompletionList(string code, int cursorPosition, ScriptState scriptState) { var projectId = ProjectId.CreateNewId("ScriptProject"); var workspace = new AdhocWorkspace(MefHostServices.DefaultHost); @@ -242,7 +243,7 @@ private async Task GetCompletionList(string code, int cursorPo } var items = completionList.Items.Select(item => item.ToModel(symbolToSymbolKey, document)).ToArray(); - return new CompletionResult(items); + return items; } private bool HasReturnValue => diff --git a/WorkspaceServer/Kernel/CompletionRequestCompleted.cs b/WorkspaceServer/Kernel/CompletionRequestCompleted.cs index c2b8775ee..257d099c5 100644 --- a/WorkspaceServer/Kernel/CompletionRequestCompleted.cs +++ b/WorkspaceServer/Kernel/CompletionRequestCompleted.cs @@ -1,17 +1,19 @@ // 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 System.Collections.Generic; using Microsoft.DotNet.Try.Protocol; namespace WorkspaceServer.Kernel { public class CompletionRequestCompleted : KernelEventBase { - public CompletionResult CompletionList { get; } + public IEnumerable CompletionList { get; } - public CompletionRequestCompleted(CompletionResult completionList, IKernelCommand command) : base(command) + public CompletionRequestCompleted(IEnumerable completionList, IKernelCommand command) : base(command) { - CompletionList = completionList; + CompletionList = completionList ?? throw new ArgumentNullException(nameof(completionList)); } } } \ No newline at end of file From 038e8cafa56836e2a9851f87db64194964ebd67f Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 17 Jul 2019 19:34:54 +0100 Subject: [PATCH 04/18] remove argument from test --- WorkspaceServer.Tests/Kernel/CSharpReplTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs index 4aa1f7f84..2f6839e6a 100644 --- a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs +++ b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs @@ -234,7 +234,7 @@ public async Task it_return_completion_list_for_types() var repl = await CreateKernelAsync(); - await repl.SendAsync(new RequestCompletion("System.Console.", 15, "csharp")); + await repl.SendAsync(new RequestCompletion("System.Console.", 15)); KernelEvents.Should() .ContainSingle(e => e is CompletionRequestReceived); @@ -254,7 +254,7 @@ public async Task it_return_completion_list_for_previously_declared_variables() await repl.SendAsync( new SubmitCode($"var alpha = new Random();")); - await repl.SendAsync(new RequestCompletion("al", 2, "csharp")); + await repl.SendAsync(new RequestCompletion("al", 2)); KernelEvents.Should() .ContainSingle(e => e is CompletionRequestReceived); From 666387272006bad3dc2d259ef9da4ca37802e710 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 17 Jul 2019 21:43:15 +0100 Subject: [PATCH 05/18] completion for types dynamically loaded (thank you @rchande) --- .../CompleteRequestHandlerTests.cs | 2 +- .../Kernel/CSharpReplTests.cs | 40 +++++++++++++++---- WorkspaceServer/Kernel/CSharpRepl.cs | 1 - 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs b/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs index d995b5bd5..1c338d684 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs +++ b/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs @@ -43,7 +43,7 @@ public void send_completeReply_on_completeRequest() { var kernel = new CSharpRepl(); var handler = new CompleteRequestHandler(kernel); - var request = Message.Create(new CompleteRequest("Conso",4 ), null); + var request = Message.Create(new CompleteRequest("System.Console.", 15 ), null); Func messageHandling = () => handler.Handle(new JupyterRequestContext(_serverChannel, _ioPubChannel, request, _kernelStatus)); _serverRecordingSocket.DecodedMessages diff --git a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs index 2f6839e6a..ba09e833e 100644 --- a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs +++ b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs @@ -229,12 +229,12 @@ await kernel.SendAsync( } [Fact] - public async Task it_return_completion_list_for_types() + public async Task it_returns_completion_list_for_types() { - var repl = await CreateKernelAsync(); + var kernel = await CreateKernelAsync(); - await repl.SendAsync(new RequestCompletion("System.Console.", 15)); + await kernel.SendAsync(new RequestCompletion("System.Console.", 15)); KernelEvents.Should() .ContainSingle(e => e is CompletionRequestReceived); @@ -247,14 +247,14 @@ public async Task it_return_completion_list_for_types() } [Fact] - public async Task it_return_completion_list_for_previously_declared_variables() + public async Task it_returns_completion_list_for_previously_declared_variables() { - var repl = await CreateKernelAsync(); + var kernel = await CreateKernelAsync(); - await repl.SendAsync( - new SubmitCode($"var alpha = new Random();")); - await repl.SendAsync(new RequestCompletion("al", 2)); + await kernel.SendAsync( + new SubmitCode("var alpha = new Random();")); + await kernel.SendAsync(new RequestCompletion("al", 2)); KernelEvents.Should() .ContainSingle(e => e is CompletionRequestReceived); @@ -265,5 +265,29 @@ await repl.SendAsync( .Should() .Contain(i => i.DisplayText == "alpha"); } + + [Fact] + public async Task it_returns_completion_list_for_types_imported_at_runtime() + { + + var kernel = await CreateKernelAsync(); + + var dll = new FileInfo(typeof(JsonConvert).Assembly.Location).FullName; + + await kernel.SendAsync( + new SubmitCode($"#r \"{dll}\"")); + + await kernel.SendAsync(new RequestCompletion("Newtonsoft.Json.JsonConvert.", 28)); + + + KernelEvents.Should() + .ContainSingle(e => e is CompletionRequestReceived); + + KernelEvents.Single(e => e is CompletionRequestCompleted) + .As() + .CompletionList + .Should() + .Contain(i => i.DisplayText == "SerializeObject"); + } } } \ No newline at end of file diff --git a/WorkspaceServer/Kernel/CSharpRepl.cs b/WorkspaceServer/Kernel/CSharpRepl.cs index 557cbe579..9b59a9a1d 100644 --- a/WorkspaceServer/Kernel/CSharpRepl.cs +++ b/WorkspaceServer/Kernel/CSharpRepl.cs @@ -203,7 +203,6 @@ private async Task> GetCompletionList(string code, i var absolutePosition = Math.Max(offset,0) + cursorPosition; var compilationOptions = compilation.Options; - var projectInfo = ProjectInfo.Create( projectId, From 91c38f7648bfde079871760c41447daba7a8d7e3 Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 18 Jul 2019 01:35:08 +0100 Subject: [PATCH 06/18] jupyter handler produces response to server --- .../CompleteRequestHandlerTests.cs | 4 +- .../CompleteRequestHandler.cs | 40 ++++++++++++++++++- .../JupyterRequestContextHandler.cs | 6 +-- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs b/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs index 1c338d684..55ef6295a 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs +++ b/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs @@ -39,12 +39,12 @@ public void cannot_handle_requests_that_are_not_completeRequest() } [Fact] - public void send_completeReply_on_completeRequest() + public async Task send_completeReply_on_completeRequest() { var kernel = new CSharpRepl(); var handler = new CompleteRequestHandler(kernel); var request = Message.Create(new CompleteRequest("System.Console.", 15 ), null); - Func messageHandling = () => handler.Handle(new JupyterRequestContext(_serverChannel, _ioPubChannel, request, _kernelStatus)); + await handler.Handle(new JupyterRequestContext(_serverChannel, _ioPubChannel, request, _kernelStatus)); _serverRecordingSocket.DecodedMessages .Should().Contain(message => diff --git a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs index 70d41521e..09638b4e0 100644 --- a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs +++ b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs @@ -3,6 +3,8 @@ using System; using System.Collections.Concurrent; +using System.Linq; +using System.Text.RegularExpressions; using System.Threading.Tasks; using Microsoft.DotNet.Try.Jupyter.Protocol; using WorkspaceServer.Kernel; @@ -11,7 +13,8 @@ namespace Microsoft.DotNet.Try.Jupyter { public class CompleteRequestHandler: RequestHandlerBase { - + private static readonly Regex _lastToken = new Regex(@"(?\S+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Multiline); + public CompleteRequestHandler(IKernel kernel) : base(kernel) { @@ -58,11 +61,44 @@ private static void OnCompletionRequestCompleted(CompletionRequestCompleted comp return; } - throw new NotImplementedException(); + var pos = ComputeReplacementStartPosition(openRequest.Request.Code, openRequest.Request.CursorPosition); + var reply = new CompleteReply(pos, openRequest.Request.CursorPosition, matches: completionRequestCompleted.CompletionList.Select(e => e.InsertText).ToList()); + var completeReply = Message.CreateResponse(reply, openRequest.Context.Request); + openRequest.Context.ServerChannel.Send(completeReply); openRequest.Context.RequestHandlerStatus.SetAsIdle(); openRequest.Dispose(); } + + private static int ComputeReplacementStartPosition(string code, int cursorPosition) + { + var pos = cursorPosition; + + if (pos > 0) + { + var codeToCursor = code.Substring(0, pos); + var match = _lastToken.Match(codeToCursor); + if (match.Success) + { + var token = match.Groups["lastToken"]; + if (token.Success) + { + var lastDotPosition = token.Value.LastIndexOf(".", StringComparison.InvariantCultureIgnoreCase); + if (lastDotPosition >= 0) + { + pos = token.Index + lastDotPosition + 1; + } + else + { + pos = token.Index; + } + } + } + + } + + return pos; + } } } \ No newline at end of file diff --git a/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs b/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs index d42ba1b75..a9bc2a978 100644 --- a/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs +++ b/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs @@ -47,9 +47,9 @@ public async Task Handle( break; case MessageTypeValues.CompleteRequest: await _completeHandler.Handle(delivery.Command); - delivery.Command.RequestHandlerStatus.SetAsBusy(); - await HandleCompleteRequest(delivery); - delivery.Command.RequestHandlerStatus.SetAsIdle(); + //delivery.Command.RequestHandlerStatus.SetAsBusy(); + //await HandleCompleteRequest(delivery); + //delivery.Command.RequestHandlerStatus.SetAsIdle(); break; } From 0ba925bac3747d421715100602e1d65bbe39a483 Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 18 Jul 2019 17:13:35 +0100 Subject: [PATCH 07/18] use completion from repl --- .../JupyterRequestContextHandler.cs | 92 ------------------- 1 file changed, 92 deletions(-) diff --git a/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs b/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs index a9bc2a978..8b5c1ca25 100644 --- a/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs +++ b/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs @@ -47,102 +47,10 @@ public async Task Handle( break; case MessageTypeValues.CompleteRequest: await _completeHandler.Handle(delivery.Command); - //delivery.Command.RequestHandlerStatus.SetAsBusy(); - //await HandleCompleteRequest(delivery); - //delivery.Command.RequestHandlerStatus.SetAsIdle(); break; } return delivery.Complete(); } - - private async Task HandleCompleteRequest(ICommandDelivery delivery) - { - var serverChannel = delivery.Command.ServerChannel; - - var completeRequest = delivery.Command.GetRequestContent (); - - var code = completeRequest.Code; - - var workspace = CreateScaffoldWorkspace(code, completeRequest.CursorPosition); - - var workspaceRequest = new WorkspaceRequest(workspace, activeBufferId: workspace.Buffers.First().Id); - - var result = await _server.GetCompletionList(workspaceRequest); - var pos = ComputeReplacementStartPosition(code, completeRequest.CursorPosition); - var reply = new CompleteReply(pos, completeRequest.CursorPosition, matches: result.Items.Select(e => e.InsertText).ToList()); - - var completeReply = Message.CreateResponse(reply, delivery.Command.Request); - serverChannel.Send(completeReply); - } - - private static int ComputeReplacementStartPosition(string code, int cursorPosition) - { - var pos = cursorPosition; - - if (pos > 0) - { - var codeToCursor = code.Substring(0, pos); - var match = _lastToken.Match(codeToCursor); - if (match.Success) - { - var token = match.Groups["lastToken"]; - if (token.Success) - { - var lastDotPosition = token.Value.LastIndexOf(".", StringComparison.InvariantCultureIgnoreCase); - if (lastDotPosition >= 0) - { - pos = token.Index + lastDotPosition + 1; - } - else - { - pos = token.Index; - } - } - } - - } - - return pos; - } - - private static Workspace CreateScaffoldWorkspace(string code, int cursorPosition = 0) - { - var workspace = CreateCsharpScaffold(code, cursorPosition); - return workspace; - } - - private static Workspace CreateCsharpScaffold(string code, int cursorPosition = 0) - { - var workspace = new Workspace( - files: new[] - { - new File("Program.cs", CsharpScaffold()) - }, - buffers: new[] - { - new Buffer(new BufferId("Program.cs", "main"), code, position:cursorPosition) - }, - workspaceType: "console", - language: "csharp"); - return workspace; - } - - private static string CsharpScaffold() => - @" -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -public class Program -{ - public static void Main() - { -#region main -#endregion - } -} -"; } } \ No newline at end of file From 6bd8215e092f64416a4366de95ce8585ec8bf38a Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 18 Jul 2019 17:16:12 +0100 Subject: [PATCH 08/18] merge --- WorkspaceServer/Kernel/CSharpRepl.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WorkspaceServer/Kernel/CSharpRepl.cs b/WorkspaceServer/Kernel/CSharpRepl.cs index feb22f4f7..ce03c3fb2 100644 --- a/WorkspaceServer/Kernel/CSharpRepl.cs +++ b/WorkspaceServer/Kernel/CSharpRepl.cs @@ -21,6 +21,8 @@ using Microsoft.DotNet.Try.Protocol; using WorkspaceServer.LanguageServices; using CompletionItem = Microsoft.DotNet.Try.Protocol.CompletionItem; +using Microsoft.DotNet.Interactive.Rendering; +using Task = System.Threading.Tasks.Task; namespace WorkspaceServer.Kernel { From 29f5e7107492d40025ca7fb90ad402e79aea80ab Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 18 Jul 2019 18:33:53 +0100 Subject: [PATCH 09/18] text naming --- .../FormatterTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.DotNet.Interactive.Rendering.Tests/FormatterTests.cs b/Microsoft.DotNet.Interactive.Rendering.Tests/FormatterTests.cs index 8c216ca06..0361924bf 100644 --- a/Microsoft.DotNet.Interactive.Rendering.Tests/FormatterTests.cs +++ b/Microsoft.DotNet.Interactive.Rendering.Tests/FormatterTests.cs @@ -626,7 +626,7 @@ public void FormatAllTypes_allows_formatters_to_be_registered_on_fly_for_all_typ Formatter.AutoGenerateForType = t => true; new FileInfo(@"c:\temp\foo.txt").ToDisplayString() - .Should().Contain(@"DirectoryName: c:\temp"); + .Should().Contain(@"DirectoryName: "); new FileInfo(@"c:\temp\foo.txt").ToDisplayString() .Should().Contain("Parent: "); new FileInfo(@"c:\temp\foo.txt").ToDisplayString() @@ -636,7 +636,7 @@ public void FormatAllTypes_allows_formatters_to_be_registered_on_fly_for_all_typ } [Fact] - public void FormatAllTypes_does_not_reregister_formatters_for_types_having_special_default_formatters() + public void FormatAllTypes_does_not_register_formatters_for_types_having_special_default_formatters() { Formatter.AutoGenerateForType = t => true; From 589a18c792cd04e39e9aa8a4cc7bf3f695855303 Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 18 Jul 2019 20:30:05 +0100 Subject: [PATCH 10/18] use workspace fixture logic --- .../CompleteRequestHandler.cs | 1 - WorkspaceServer/Kernel/CSharpRepl.cs | 34 +++---------------- .../Servers/Scripting/WorkspaceFixture.cs | 26 ++++++++------ 3 files changed, 19 insertions(+), 42 deletions(-) diff --git a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs index 09638b4e0..175601ecd 100644 --- a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs +++ b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs @@ -42,7 +42,6 @@ void OnKernelResultEvent(IKernelEvent value) { switch (value) { - case CompletionRequestCompleted completionRequestCompleted: OnCompletionRequestCompleted(completionRequestCompleted, OpenRequests); break; diff --git a/WorkspaceServer/Kernel/CSharpRepl.cs b/WorkspaceServer/Kernel/CSharpRepl.cs index ce03c3fb2..2d5dfa78d 100644 --- a/WorkspaceServer/Kernel/CSharpRepl.cs +++ b/WorkspaceServer/Kernel/CSharpRepl.cs @@ -13,15 +13,12 @@ using Microsoft.CodeAnalysis.Completion; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Scripting; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Host.Mef; using Microsoft.CodeAnalysis.Recommendations; using Microsoft.CodeAnalysis.Scripting; -using Microsoft.CodeAnalysis.Text; -using Microsoft.DotNet.Try.Protocol; using WorkspaceServer.LanguageServices; using CompletionItem = Microsoft.DotNet.Try.Protocol.CompletionItem; using Microsoft.DotNet.Interactive.Rendering; +using WorkspaceServer.Servers.Scripting; using Task = System.Threading.Tasks.Task; namespace WorkspaceServer.Kernel @@ -199,9 +196,6 @@ private async Task HandleRequestCompletion( private async Task> GetCompletionList(string code, int cursorPosition, ScriptState scriptState) { - var projectId = ProjectId.CreateNewId("ScriptProject"); - var workspace = new AdhocWorkspace(MefHostServices.DefaultHost); - var metadataReferences = ImmutableArray.Empty; var forcedState = false; @@ -211,6 +205,7 @@ private async Task> GetCompletionList(string code, i forcedState = true; } + var compilation = scriptState.Script.GetCompilation(); metadataReferences = metadataReferences.AddRange(compilation.References); @@ -220,29 +215,8 @@ private async Task> GetCompletionList(string code, i var offset = fullScriptCode.LastIndexOf(code, StringComparison.InvariantCulture); var absolutePosition = Math.Max(offset,0) + cursorPosition; - var compilationOptions = compilation.Options; - - var projectInfo = ProjectInfo.Create( - projectId, - version: VersionStamp.Create(), - name: "ScriptProject", - assemblyName: "ScriptProject", - language: LanguageNames.CSharp, - compilationOptions: compilationOptions, - metadataReferences: metadataReferences); - - workspace.AddProject(projectInfo); - - var documentId = DocumentId.CreateNewId(projectId, "ScriptDocument"); - - var documentInfo = DocumentInfo.Create(documentId, - name: "ScriptDocument", - sourceCodeKind: SourceCodeKind.Script); - - workspace.AddDocument(documentInfo); - - var document = workspace.CurrentSolution.GetDocument(documentId); - document = document.WithText(SourceText.From(fullScriptCode)); + var fixture = new WorkspaceFixture(compilation.Options, metadataReferences); + var document = fixture.ForkDocument(fullScriptCode); var service = CompletionService.GetService(document); var completionList = await service.GetCompletionsAsync(document, absolutePosition); diff --git a/WorkspaceServer/Servers/Scripting/WorkspaceFixture.cs b/WorkspaceServer/Servers/Scripting/WorkspaceFixture.cs index 46195d29a..a572cb1f2 100644 --- a/WorkspaceServer/Servers/Scripting/WorkspaceFixture.cs +++ b/WorkspaceServer/Servers/Scripting/WorkspaceFixture.cs @@ -17,25 +17,19 @@ internal class WorkspaceFixture private readonly DocumentId _documentId; public WorkspaceFixture( - IEnumerable defaultUsings, + CompilationOptions compilationOptions, ImmutableArray metadataReferences) { - if (defaultUsings == null) + if (compilationOptions == null) { - throw new ArgumentNullException(nameof(defaultUsings)); + throw new ArgumentNullException(nameof(compilationOptions)); } - if (metadataReferences == null) { throw new ArgumentNullException(nameof(metadataReferences)); } - var projectId = ProjectId.CreateNewId("ScriptProject"); - var compilationOptions = new CSharpCompilationOptions( - OutputKind.DynamicallyLinkedLibrary, - usings: defaultUsings); - var projectInfo = ProjectInfo.Create( projectId, version: VersionStamp.Create(), @@ -50,12 +44,22 @@ public WorkspaceFixture( _documentId = DocumentId.CreateNewId(projectId, "ScriptDocument"); var documentInfo = DocumentInfo.Create(_documentId, - name: "ScriptDocument", - sourceCodeKind: SourceCodeKind.Script); + name: "ScriptDocument", + sourceCodeKind: SourceCodeKind.Script); _workspace.AddDocument(documentInfo); } + + public WorkspaceFixture( + IEnumerable defaultUsings, + ImmutableArray metadataReferences) : this(new CSharpCompilationOptions( + OutputKind.DynamicallyLinkedLibrary, + usings: defaultUsings), metadataReferences) + { + + } + public Document ForkDocument(string text) { var document = _workspace.CurrentSolution.GetDocument(_documentId); From 61a6b78af7dcaaa41ebeeb41cb553e304ab32b52 Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 18 Jul 2019 20:36:36 +0100 Subject: [PATCH 11/18] fix typos --- WorkspaceServer/Kernel/CSharpRepl.cs | 2 +- WorkspaceServer/Servers/Scripting/WorkspaceFixture.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WorkspaceServer/Kernel/CSharpRepl.cs b/WorkspaceServer/Kernel/CSharpRepl.cs index 2d5dfa78d..35f06a9b0 100644 --- a/WorkspaceServer/Kernel/CSharpRepl.cs +++ b/WorkspaceServer/Kernel/CSharpRepl.cs @@ -209,7 +209,7 @@ private async Task> GetCompletionList(string code, i var compilation = scriptState.Script.GetCompilation(); metadataReferences = metadataReferences.AddRange(compilation.References); - var buffer = new StringBuilder(forcedState ? string.Empty : (scriptState.Script.Code ?? string.Empty)); + var buffer = new StringBuilder(forcedState ? string.Empty : scriptState.Script.Code ?? string.Empty); buffer.AppendLine(code); var fullScriptCode = buffer.ToString(); var offset = fullScriptCode.LastIndexOf(code, StringComparison.InvariantCulture); diff --git a/WorkspaceServer/Servers/Scripting/WorkspaceFixture.cs b/WorkspaceServer/Servers/Scripting/WorkspaceFixture.cs index a572cb1f2..0e38e8dce 100644 --- a/WorkspaceServer/Servers/Scripting/WorkspaceFixture.cs +++ b/WorkspaceServer/Servers/Scripting/WorkspaceFixture.cs @@ -15,6 +15,7 @@ internal class WorkspaceFixture { private readonly AdhocWorkspace _workspace = new AdhocWorkspace(MefHostServices.DefaultHost); private readonly DocumentId _documentId; + private Project _project; public WorkspaceFixture( CompilationOptions compilationOptions, @@ -39,7 +40,7 @@ public WorkspaceFixture( compilationOptions: compilationOptions, metadataReferences: metadataReferences); - _workspace.AddProject(projectInfo); + _project = _workspace.AddProject(projectInfo); _documentId = DocumentId.CreateNewId(projectId, "ScriptDocument"); From 8381a67fac0f4763b60bf84fc9470f881406ccd7 Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 18 Jul 2019 20:41:35 +0100 Subject: [PATCH 12/18] reuse fixtures if no changes occurred in the script references --- WorkspaceServer/Kernel/CSharpRepl.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/WorkspaceServer/Kernel/CSharpRepl.cs b/WorkspaceServer/Kernel/CSharpRepl.cs index 35f06a9b0..702532831 100644 --- a/WorkspaceServer/Kernel/CSharpRepl.cs +++ b/WorkspaceServer/Kernel/CSharpRepl.cs @@ -36,9 +36,12 @@ public class CSharpRepl : KernelBase protected ScriptOptions ScriptOptions; private StringBuilder _inputBuffer = new StringBuilder(); + private ImmutableArray _metadataReferences; + private WorkspaceFixture _fixture; public CSharpRepl() { + _metadataReferences = ImmutableArray.Empty; SetupScriptOptions(); } @@ -205,7 +208,6 @@ private async Task> GetCompletionList(string code, i forcedState = true; } - var compilation = scriptState.Script.GetCompilation(); metadataReferences = metadataReferences.AddRange(compilation.References); @@ -215,8 +217,13 @@ private async Task> GetCompletionList(string code, i var offset = fullScriptCode.LastIndexOf(code, StringComparison.InvariantCulture); var absolutePosition = Math.Max(offset,0) + cursorPosition; - var fixture = new WorkspaceFixture(compilation.Options, metadataReferences); - var document = fixture.ForkDocument(fullScriptCode); + if (_fixture == null || _metadataReferences != metadataReferences) + { + _fixture = new WorkspaceFixture(compilation.Options, metadataReferences); + _metadataReferences = metadataReferences; + } + + var document = _fixture.ForkDocument(fullScriptCode); var service = CompletionService.GetService(document); var completionList = await service.GetCompletionsAsync(document, absolutePosition); From d70a8bfbaab0152c5cb46d19ec8032b2d88e1a90 Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 18 Jul 2019 20:45:13 +0100 Subject: [PATCH 13/18] rename open requests to in flight requests --- .../CompleteRequestHandler.cs | 10 +++++----- .../ExecuteRequestHandler.cs | 20 +++++++++---------- .../RequestHandlerBase.cs | 8 ++++---- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs index 175601ecd..fc6bcc80f 100644 --- a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs +++ b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs @@ -23,15 +23,15 @@ public CompleteRequestHandler(IKernel kernel) : base(kernel) public async Task Handle(JupyterRequestContext context) { - var completeRequest = GetRequest(context); + var completeRequest = GetJupyterRequest(context); context.RequestHandlerStatus.SetAsBusy(); var command = new RequestCompletion(completeRequest.Code, completeRequest.CursorPosition); - var openRequest = new OpenRequest(context, completeRequest, 0, null); + var openRequest = new InflightRequest(context, completeRequest, 0, null); - OpenRequests[command] = openRequest; + InFlightRequests[command] = openRequest; var kernelResult = await Kernel.SendAsync(command); openRequest.AddDisposable(kernelResult.KernelEvents.Subscribe(OnKernelResultEvent)); @@ -43,7 +43,7 @@ void OnKernelResultEvent(IKernelEvent value) switch (value) { case CompletionRequestCompleted completionRequestCompleted: - OnCompletionRequestCompleted(completionRequestCompleted, OpenRequests); + OnCompletionRequestCompleted(completionRequestCompleted, InFlightRequests); break; case CompletionRequestReceived _: break; @@ -52,7 +52,7 @@ void OnKernelResultEvent(IKernelEvent value) } } - private static void OnCompletionRequestCompleted(CompletionRequestCompleted completionRequestCompleted, ConcurrentDictionary openRequests) + private static void OnCompletionRequestCompleted(CompletionRequestCompleted completionRequestCompleted, ConcurrentDictionary openRequests) { openRequests.TryGetValue(completionRequestCompleted.Command, out var openRequest); if (openRequest == null) diff --git a/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs b/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs index d9dae88a0..3a449e9e9 100644 --- a/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs +++ b/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs @@ -22,7 +22,7 @@ public ExecuteRequestHandler(IKernel kernel) :base(kernel) public async Task Handle(JupyterRequestContext context) { - var executeRequest = GetRequest(context); + var executeRequest = GetJupyterRequest(context); context.RequestHandlerStatus.SetAsBusy(); var executionCount = executeRequest.Silent ? _executionCount : Interlocked.Increment(ref _executionCount); @@ -30,9 +30,9 @@ public async Task Handle(JupyterRequestContext context) var command = new SubmitCode(executeRequest.Code, "csharp"); var id = Guid.NewGuid(); var transient = new Dictionary { { "display_id", id.ToString() } }; - var openRequest = new OpenRequest(context, executeRequest, executionCount, transient); + var openRequest = new InflightRequest(context, executeRequest, executionCount, transient); - OpenRequests[command] = openRequest; + InFlightRequests[command] = openRequest; try { @@ -41,7 +41,7 @@ public async Task Handle(JupyterRequestContext context) } catch (Exception e) { - OpenRequests.TryRemove(command, out _); + InFlightRequests.TryRemove(command, out _); var errorContent = new Error( eName: "Unhandled Exception", @@ -82,13 +82,13 @@ void OnKernelResultEvent(IKernelEvent value) switch (value) { case ValueProduced valueProduced: - OnValueProduced(valueProduced, OpenRequests); + OnValueProduced(valueProduced, InFlightRequests); break; case CodeSubmissionEvaluated codeSubmissionEvaluated: - OnCodeSubmissionEvaluated(codeSubmissionEvaluated, OpenRequests); + OnCodeSubmissionEvaluated(codeSubmissionEvaluated, InFlightRequests); break; case CodeSubmissionEvaluationFailed codeSubmissionEvaluationFailed: - OnCodeSubmissionEvaluatedFailed(codeSubmissionEvaluationFailed, OpenRequests); + OnCodeSubmissionEvaluatedFailed(codeSubmissionEvaluationFailed, InFlightRequests); break; case CodeSubmissionReceived _: case IncompleteCodeSubmissionReceived _: @@ -99,7 +99,7 @@ void OnKernelResultEvent(IKernelEvent value) } } - private static void OnCodeSubmissionEvaluatedFailed(CodeSubmissionEvaluationFailed codeSubmissionEvaluationFailed, ConcurrentDictionary openRequests) + private static void OnCodeSubmissionEvaluatedFailed(CodeSubmissionEvaluationFailed codeSubmissionEvaluationFailed, ConcurrentDictionary openRequests) { openRequests.TryRemove(codeSubmissionEvaluationFailed.Command, out var openRequest); @@ -140,7 +140,7 @@ private static void OnCodeSubmissionEvaluatedFailed(CodeSubmissionEvaluationFail private static void OnValueProduced( ValueProduced valueProduced, - ConcurrentDictionary openRequests) + ConcurrentDictionary openRequests) { openRequests.TryGetValue(valueProduced.Command, out var openRequest); if (openRequest == null) @@ -192,7 +192,7 @@ private static void OnValueProduced( } private static void OnCodeSubmissionEvaluated(CodeSubmissionEvaluated codeSubmissionEvaluated, - ConcurrentDictionary openRequests) + ConcurrentDictionary openRequests) { openRequests.TryRemove(codeSubmissionEvaluated.Command, out var openRequest); // reply ok diff --git a/Microsoft.DotNet.Try.Jupyter/RequestHandlerBase.cs b/Microsoft.DotNet.Try.Jupyter/RequestHandlerBase.cs index f5e7873b8..08d6d6707 100644 --- a/Microsoft.DotNet.Try.Jupyter/RequestHandlerBase.cs +++ b/Microsoft.DotNet.Try.Jupyter/RequestHandlerBase.cs @@ -20,7 +20,7 @@ protected RequestHandlerBase(IKernel kernel) Kernel = kernel ?? throw new ArgumentNullException(nameof(kernel)); } - protected static T GetRequest(JupyterRequestContext context) + protected static T GetJupyterRequest(JupyterRequestContext context) { var request = context.GetRequestContent() ?? throw new InvalidOperationException( @@ -30,14 +30,14 @@ protected static T GetRequest(JupyterRequestContext context) protected IKernel Kernel { get; } - protected ConcurrentDictionary OpenRequests { get; } = new ConcurrentDictionary(); + protected ConcurrentDictionary InFlightRequests { get; } = new ConcurrentDictionary(); public void Dispose() { _disposables.Dispose(); } - protected class OpenRequest : IDisposable + protected class InflightRequest : IDisposable { private readonly CompositeDisposable _disposables = new CompositeDisposable(); public Dictionary Transient { get; } @@ -45,7 +45,7 @@ protected class OpenRequest : IDisposable public T Request { get; } public int ExecutionCount { get; } - public OpenRequest(JupyterRequestContext context, T request, int executionCount, + public InflightRequest(JupyterRequestContext context, T request, int executionCount, Dictionary transient) { Context = context; From 9e5869bbe14b75265cc76bb4848dcc4889232612 Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 18 Jul 2019 22:31:31 +0100 Subject: [PATCH 14/18] PR feedback on naming --- .../FormatterTests.cs | 2 +- .../CompleteRequestHandlerTests.cs | 4 ++-- .../ExecuteRequestHandlerTests.cs | 6 +++--- Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs | 2 +- Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Microsoft.DotNet.Interactive.Rendering.Tests/FormatterTests.cs b/Microsoft.DotNet.Interactive.Rendering.Tests/FormatterTests.cs index 0361924bf..39cb306ac 100644 --- a/Microsoft.DotNet.Interactive.Rendering.Tests/FormatterTests.cs +++ b/Microsoft.DotNet.Interactive.Rendering.Tests/FormatterTests.cs @@ -636,7 +636,7 @@ public void FormatAllTypes_allows_formatters_to_be_registered_on_fly_for_all_typ } [Fact] - public void FormatAllTypes_does_not_register_formatters_for_types_having_special_default_formatters() + public void FormatAllTypes_does_not_reregister_formatters_for_types_having_special_default_formatters() { Formatter.AutoGenerateForType = t => true; diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs b/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs index 55ef6295a..4874ca51b 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs +++ b/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs @@ -29,7 +29,7 @@ public CompleteRequestHandlerTests() } [Fact] - public void cannot_handle_requests_that_are_not_completeRequest() + public void cannot_handle_requests_that_are_not_CompleteRequest() { var kernel = new CSharpRepl(); var handler = new CompleteRequestHandler(kernel); @@ -39,7 +39,7 @@ public void cannot_handle_requests_that_are_not_completeRequest() } [Fact] - public async Task send_completeReply_on_completeRequest() + public async Task send_completeReply_on_CompleteRequest() { var kernel = new CSharpRepl(); var handler = new CompleteRequestHandler(kernel); diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/ExecuteRequestHandlerTests.cs b/Microsoft.DotNet.Try.Jupyter.Tests/ExecuteRequestHandlerTests.cs index c124a252b..aeeffc457 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/ExecuteRequestHandlerTests.cs +++ b/Microsoft.DotNet.Try.Jupyter.Tests/ExecuteRequestHandlerTests.cs @@ -29,7 +29,7 @@ public ExecuteRequestHandlerTests() } [Fact] - public void cannot_handle_requests_that_are_not_executeRequest() + public void cannot_handle_requests_that_are_not_ExecuteRequest() { var kernel = new CSharpRepl(); var handler = new ExecuteRequestHandler(kernel); @@ -48,7 +48,7 @@ public async Task handles_executeRequest() } [Fact] - public async Task sends_ExecuteReply_message_on_codeSubmissionEvaluated() + public async Task sends_ExecuteReply_message_on_CodeSubmissionEvaluated() { var kernel = new CSharpRepl(); @@ -62,7 +62,7 @@ public async Task sends_ExecuteReply_message_on_codeSubmissionEvaluated() } [Fact] - public async Task sends_executeReply_with_error_message_on_codeSubmissionEvaluated() + public async Task sends_ExecuteReply_with_error_message_on_CodeSubmissionEvaluated() { var kernel = new CSharpRepl(); diff --git a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs index fc6bcc80f..ac5b94f1a 100644 --- a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs +++ b/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs @@ -48,7 +48,7 @@ void OnKernelResultEvent(IKernelEvent value) case CompletionRequestReceived _: break; default: - throw new NotImplementedException(); + throw new NotSupportedException(); } } diff --git a/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs b/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs index 3a449e9e9..9763e2536 100644 --- a/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs +++ b/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs @@ -95,7 +95,7 @@ void OnKernelResultEvent(IKernelEvent value) case CompleteCodeSubmissionReceived _: break; default: - throw new NotImplementedException(); + throw new NotSupportedException(); } } From 6d188b9b799d01344fca0a07e966d2932d3cb872 Mon Sep 17 00:00:00 2001 From: Diego Date: Fri, 19 Jul 2019 07:59:26 +0100 Subject: [PATCH 15/18] add header to integration tests --- NotIntegrationTests/DotnetTry.cs | 8 ++++-- NotIntegrationTests/IntegrationTests.cs | 5 +++- WorkspaceServer/Kernel/CSharpRepl.cs | 3 +- WorkspaceServer/Kernel/CompletionItem.cs | 28 +++++++++++++++++++ .../Kernel/CompletionRequestCompleted.cs | 1 - .../Kernel/ProtocolObjectExtensions.cs | 13 +++++++++ 6 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 WorkspaceServer/Kernel/CompletionItem.cs create mode 100644 WorkspaceServer/Kernel/ProtocolObjectExtensions.cs diff --git a/NotIntegrationTests/DotnetTry.cs b/NotIntegrationTests/DotnetTry.cs index f99c91125..502eba17c 100644 --- a/NotIntegrationTests/DotnetTry.cs +++ b/NotIntegrationTests/DotnetTry.cs @@ -1,11 +1,13 @@ -using System; -using System.Collections.Generic; +// 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 System.Diagnostics; using System.IO; using System.Linq; using System.Net.Http; using System.Runtime.CompilerServices; -using System.Text; using System.Threading.Tasks; using MLS.Agent; using MLS.Agent.Tools; diff --git a/NotIntegrationTests/IntegrationTests.cs b/NotIntegrationTests/IntegrationTests.cs index 21fb57538..37872d9e2 100644 --- a/NotIntegrationTests/IntegrationTests.cs +++ b/NotIntegrationTests/IntegrationTests.cs @@ -1,4 +1,7 @@ -using System; +// 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.Threading.Tasks; using FluentAssertions; using Xunit; diff --git a/WorkspaceServer/Kernel/CSharpRepl.cs b/WorkspaceServer/Kernel/CSharpRepl.cs index 702532831..840c1ebfd 100644 --- a/WorkspaceServer/Kernel/CSharpRepl.cs +++ b/WorkspaceServer/Kernel/CSharpRepl.cs @@ -16,7 +16,6 @@ using Microsoft.CodeAnalysis.Recommendations; using Microsoft.CodeAnalysis.Scripting; using WorkspaceServer.LanguageServices; -using CompletionItem = Microsoft.DotNet.Try.Protocol.CompletionItem; using Microsoft.DotNet.Interactive.Rendering; using WorkspaceServer.Servers.Scripting; using Task = System.Threading.Tasks.Task; @@ -239,7 +238,7 @@ private async Task> GetCompletionList(string code, i symbolToSymbolKey[key] = symbol; } } - var items = completionList.Items.Select(item => item.ToModel(symbolToSymbolKey, document)).ToArray(); + var items = completionList.Items.Select(item => item.ToModel(symbolToSymbolKey, document).ToDomainObject()).ToArray(); return items; } diff --git a/WorkspaceServer/Kernel/CompletionItem.cs b/WorkspaceServer/Kernel/CompletionItem.cs new file mode 100644 index 000000000..6bdf582dc --- /dev/null +++ b/WorkspaceServer/Kernel/CompletionItem.cs @@ -0,0 +1,28 @@ +// 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 CompletionItem + { + public string DisplayText { get; } + public string Kind { get; } + public string FilterText { get; } + public string SortText { get; } + public string InsertText { get; } + public string Documentation { get; set; } + public CompletionItem(string displayText, string kind, string filterText = null, string sortText = null, string insertText = null, string documentation = null) + { + DisplayText = displayText ?? throw new ArgumentNullException(nameof(displayText)); + Kind = kind ?? throw new ArgumentException(nameof(kind)); + FilterText = filterText; + SortText = sortText; + InsertText = insertText; + Documentation = documentation; + } + + public override string ToString() => DisplayText; + } +} \ No newline at end of file diff --git a/WorkspaceServer/Kernel/CompletionRequestCompleted.cs b/WorkspaceServer/Kernel/CompletionRequestCompleted.cs index 257d099c5..48026e50b 100644 --- a/WorkspaceServer/Kernel/CompletionRequestCompleted.cs +++ b/WorkspaceServer/Kernel/CompletionRequestCompleted.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using Microsoft.DotNet.Try.Protocol; namespace WorkspaceServer.Kernel { diff --git a/WorkspaceServer/Kernel/ProtocolObjectExtensions.cs b/WorkspaceServer/Kernel/ProtocolObjectExtensions.cs new file mode 100644 index 000000000..419f1eea3 --- /dev/null +++ b/WorkspaceServer/Kernel/ProtocolObjectExtensions.cs @@ -0,0 +1,13 @@ +// 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 +{ + internal static class ProtocolObjectExtensions{ + public static CompletionItem ToDomainObject(this Microsoft.DotNet.Try.Protocol.CompletionItem source) + { + return new CompletionItem(source.DisplayText, source.Kind, source.FilterText, source.SortText, source.InsertText, source.Documentation?.Value); + } + } +} \ No newline at end of file From 29bbe163cbcd5579e667ade1aad8c49d4da5b913 Mon Sep 17 00:00:00 2001 From: Diego Date: Fri, 19 Jul 2019 08:19:19 +0100 Subject: [PATCH 16/18] rename Microsoft.DotNet.Try.Jupyter.Tests to Microsoft.DotNet.Interactive.Jupyter.Tests --- DotNetTry.sln | 20 ++++++++++--------- .../CompleteRequestHandlerTests.cs | 3 ++- .../ExecuteRequestHandlerTests.cs | 3 ++- .../HistorySerializationTests.cs | 2 +- ...contract_has_not_been_broken.approved.json | 0 ...contract_has_not_been_broken.approved.json | 0 ...contract_has_not_been_broken.approved.json | 0 ...contract_has_not_been_broken.approved.json | 0 ...contract_has_not_been_broken.approved.json | 0 ...contract_has_not_been_broken.approved.json | 0 .../JupyterMessageContractTests.cs | 3 ++- .../KernelStatus.cs | 4 +++- ...ft.DotNet.Interactive.Jupyter.Tests.csproj | 0 .../RecordingSocket.cs | 2 +- .../TextSocket.cs | 2 +- 15 files changed, 23 insertions(+), 16 deletions(-) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/CompleteRequestHandlerTests.cs (96%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/ExecuteRequestHandlerTests.cs (98%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/HistorySerializationTests.cs (98%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/JupyterMessageContractTests.Complete_reply_contract_has_not_been_broken.approved.json (100%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/JupyterMessageContractTests.Display_data_contract_has_not_been_broken.approved.json (100%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/JupyterMessageContractTests.Execute_result_contract_has_not_been_broken.approved.json (100%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/JupyterMessageContractTests.Execution_result_contract_has_not_been_broken.approved.json (100%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/JupyterMessageContractTests.KernelInfoReply_contract_has_not_been_broken.approved.json (100%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/JupyterMessageContractTests.Update_data_contract_has_not_been_broken.approved.json (100%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/JupyterMessageContractTests.cs (98%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/KernelStatus.cs (83%) rename Microsoft.DotNet.Try.Jupyter.Tests/Microsoft.DotNet.Try.Jupyter.Tests.csproj => Microsoft.DotNet.Interactive.Jupyter.Tests/Microsoft.DotNet.Interactive.Jupyter.Tests.csproj (100%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/RecordingSocket.cs (91%) rename {Microsoft.DotNet.Try.Jupyter.Tests => Microsoft.DotNet.Interactive.Jupyter.Tests}/TextSocket.cs (93%) diff --git a/DotNetTry.sln b/DotNetTry.sln index 3fd5c8c9d..8a12c9438 100644 --- a/DotNetTry.sln +++ b/DotNetTry.sln @@ -1,4 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 + +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.28803.352 MinimumVisualStudioVersion = 10.0.40219.1 @@ -36,8 +37,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MLS.WasmCodeRunner.Tests", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Try.Jupyter", "Microsoft.DotNet.Try.Jupyter\Microsoft.DotNet.Try.Jupyter.csproj", "{DDBAB171-7BA2-4B0F-8606-7CF21B969804}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Try.Jupyter.Tests", "Microsoft.DotNet.Try.Jupyter.Tests\Microsoft.DotNet.Try.Jupyter.Tests.csproj", "{614B2E7B-7B05-4023-9C6E-CE708EB1673F}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Try.Markdown", "Microsoft.DotNet.Try.Markdown\Microsoft.DotNet.Try.Markdown.csproj", "{B70584C1-41A3-4DB3-9C49-799DFF57A3FC}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Try.Markdown.Tests", "Microsoft.DotNet.Try.Markdown.Tests\Microsoft.DotNet.Try.Markdown.Tests.csproj", "{F2FEA069-3121-4AB3-8835-F4EF6FCBFA18}" @@ -54,11 +53,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ProjectTem EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharpWorkspaceShim", "FSharpWorkspaceShim\FSharpWorkspaceShim.fsproj", "{9128FCED-2A19-4502-BCEE-BE1BAB6882EB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotIntegrationTests", "NotIntegrationTests\NotIntegrationTests.csproj", "{EA6DDD48-941D-43C6-BAC1-07CF24F4C792}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotIntegrationTests", "NotIntegrationTests\NotIntegrationTests.csproj", "{EA6DDD48-941D-43C6-BAC1-07CF24F4C792}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.Rendering", "Microsoft.DotNet.Interactive.Rendering\Microsoft.DotNet.Interactive.Rendering.csproj", "{FBEA5F71-23F5-4412-A936-9B8E6E228968}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.Rendering.Tests", "Microsoft.DotNet.Interactive.Rendering.Tests\Microsoft.DotNet.Interactive.Rendering.Tests.csproj", "{B4B9DC70-6BA2-4BC1-A780-7FCEBDB1D218}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.Jupyter.Tests", "Microsoft.DotNet.Interactive.Jupyter.Tests\Microsoft.DotNet.Interactive.Jupyter.Tests.csproj", "{91902AAC-F4E9-4648-AC6B-4E4A722D3CC5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -125,10 +127,6 @@ Global {DDBAB171-7BA2-4B0F-8606-7CF21B969804}.Debug|Any CPU.Build.0 = Debug|Any CPU {DDBAB171-7BA2-4B0F-8606-7CF21B969804}.Release|Any CPU.ActiveCfg = Release|Any CPU {DDBAB171-7BA2-4B0F-8606-7CF21B969804}.Release|Any CPU.Build.0 = Release|Any CPU - {614B2E7B-7B05-4023-9C6E-CE708EB1673F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {614B2E7B-7B05-4023-9C6E-CE708EB1673F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {614B2E7B-7B05-4023-9C6E-CE708EB1673F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {614B2E7B-7B05-4023-9C6E-CE708EB1673F}.Release|Any CPU.Build.0 = Release|Any CPU {B70584C1-41A3-4DB3-9C49-799DFF57A3FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B70584C1-41A3-4DB3-9C49-799DFF57A3FC}.Debug|Any CPU.Build.0 = Debug|Any CPU {B70584C1-41A3-4DB3-9C49-799DFF57A3FC}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -173,6 +171,10 @@ Global {B4B9DC70-6BA2-4BC1-A780-7FCEBDB1D218}.Debug|Any CPU.Build.0 = Debug|Any CPU {B4B9DC70-6BA2-4BC1-A780-7FCEBDB1D218}.Release|Any CPU.ActiveCfg = Release|Any CPU {B4B9DC70-6BA2-4BC1-A780-7FCEBDB1D218}.Release|Any CPU.Build.0 = Release|Any CPU + {91902AAC-F4E9-4648-AC6B-4E4A722D3CC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91902AAC-F4E9-4648-AC6B-4E4A722D3CC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91902AAC-F4E9-4648-AC6B-4E4A722D3CC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91902AAC-F4E9-4648-AC6B-4E4A722D3CC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -193,7 +195,6 @@ Global {9DAE862E-C8AE-452B-B27E-C6DEB1403E81} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} {AAEF5063-5D4C-4CA7-8E22-0DAE1ADBBCD1} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} {DDBAB171-7BA2-4B0F-8606-7CF21B969804} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} - {614B2E7B-7B05-4023-9C6E-CE708EB1673F} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} {B70584C1-41A3-4DB3-9C49-799DFF57A3FC} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} {F2FEA069-3121-4AB3-8835-F4EF6FCBFA18} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} {7EAD5482-90CC-4252-AF91-553A4B81D8E0} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} @@ -204,6 +205,7 @@ Global {9128FCED-2A19-4502-BCEE-BE1BAB6882EB} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} {EA6DDD48-941D-43C6-BAC1-07CF24F4C792} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} {B4B9DC70-6BA2-4BC1-A780-7FCEBDB1D218} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} + {91902AAC-F4E9-4648-AC6B-4E4A722D3CC5} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D6CD99BA-B16B-4570-8910-225CBDFFA3AD} diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/CompleteRequestHandlerTests.cs similarity index 96% rename from Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs rename to Microsoft.DotNet.Interactive.Jupyter.Tests/CompleteRequestHandlerTests.cs index 4874ca51b..e4eee4f47 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/CompleteRequestHandlerTests.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/CompleteRequestHandlerTests.cs @@ -4,11 +4,12 @@ using System; using System.Threading.Tasks; using FluentAssertions; +using Microsoft.DotNet.Try.Jupyter; using Microsoft.DotNet.Try.Jupyter.Protocol; using WorkspaceServer.Kernel; using Xunit; -namespace Microsoft.DotNet.Try.Jupyter.Tests +namespace Microsoft.DotNet.Interactive.Jupyter.Tests { public class CompleteRequestHandlerTests { diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/ExecuteRequestHandlerTests.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/ExecuteRequestHandlerTests.cs similarity index 98% rename from Microsoft.DotNet.Try.Jupyter.Tests/ExecuteRequestHandlerTests.cs rename to Microsoft.DotNet.Interactive.Jupyter.Tests/ExecuteRequestHandlerTests.cs index aeeffc457..91a0c7dfa 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/ExecuteRequestHandlerTests.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/ExecuteRequestHandlerTests.cs @@ -4,11 +4,12 @@ using System; using System.Threading.Tasks; using FluentAssertions; +using Microsoft.DotNet.Try.Jupyter; using Microsoft.DotNet.Try.Jupyter.Protocol; using WorkspaceServer.Kernel; using Xunit; -namespace Microsoft.DotNet.Try.Jupyter.Tests +namespace Microsoft.DotNet.Interactive.Jupyter.Tests { public class ExecuteRequestHandlerTests { diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/HistorySerializationTests.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/HistorySerializationTests.cs similarity index 98% rename from Microsoft.DotNet.Try.Jupyter.Tests/HistorySerializationTests.cs rename to Microsoft.DotNet.Interactive.Jupyter.Tests/HistorySerializationTests.cs index c6f4507c3..e26ce404e 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/HistorySerializationTests.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/HistorySerializationTests.cs @@ -6,7 +6,7 @@ using Newtonsoft.Json; using Xunit; -namespace Microsoft.DotNet.Try.Jupyter.Tests +namespace Microsoft.DotNet.Interactive.Jupyter.Tests { public class HistorySerializationTests { diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Complete_reply_contract_has_not_been_broken.approved.json b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Complete_reply_contract_has_not_been_broken.approved.json similarity index 100% rename from Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Complete_reply_contract_has_not_been_broken.approved.json rename to Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Complete_reply_contract_has_not_been_broken.approved.json diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Display_data_contract_has_not_been_broken.approved.json b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Display_data_contract_has_not_been_broken.approved.json similarity index 100% rename from Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Display_data_contract_has_not_been_broken.approved.json rename to Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Display_data_contract_has_not_been_broken.approved.json diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Execute_result_contract_has_not_been_broken.approved.json b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Execute_result_contract_has_not_been_broken.approved.json similarity index 100% rename from Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Execute_result_contract_has_not_been_broken.approved.json rename to Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Execute_result_contract_has_not_been_broken.approved.json diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Execution_result_contract_has_not_been_broken.approved.json b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Execution_result_contract_has_not_been_broken.approved.json similarity index 100% rename from Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Execution_result_contract_has_not_been_broken.approved.json rename to Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Execution_result_contract_has_not_been_broken.approved.json diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.KernelInfoReply_contract_has_not_been_broken.approved.json b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.KernelInfoReply_contract_has_not_been_broken.approved.json similarity index 100% rename from Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.KernelInfoReply_contract_has_not_been_broken.approved.json rename to Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.KernelInfoReply_contract_has_not_been_broken.approved.json diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Update_data_contract_has_not_been_broken.approved.json b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Update_data_contract_has_not_been_broken.approved.json similarity index 100% rename from Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.Update_data_contract_has_not_been_broken.approved.json rename to Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.Update_data_contract_has_not_been_broken.approved.json diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.cs similarity index 98% rename from Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.cs rename to Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.cs index 81ec35948..624ef5544 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/JupyterMessageContractTests.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.cs @@ -4,10 +4,11 @@ using System; using System.Collections.Generic; using Assent; +using Microsoft.DotNet.Try.Jupyter; using Microsoft.DotNet.Try.Jupyter.Protocol; using Xunit; -namespace Microsoft.DotNet.Try.Jupyter.Tests +namespace Microsoft.DotNet.Interactive.Jupyter.Tests { public class JupyterMessageContractTests { diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/KernelStatus.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/KernelStatus.cs similarity index 83% rename from Microsoft.DotNet.Try.Jupyter.Tests/KernelStatus.cs rename to Microsoft.DotNet.Interactive.Jupyter.Tests/KernelStatus.cs index 292353943..1a724a918 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/KernelStatus.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/KernelStatus.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 Microsoft.DotNet.Try.Jupyter.Tests +using Microsoft.DotNet.Try.Jupyter; + +namespace Microsoft.DotNet.Interactive.Jupyter.Tests { class KernelStatus : IRequestHandlerStatus { diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/Microsoft.DotNet.Try.Jupyter.Tests.csproj b/Microsoft.DotNet.Interactive.Jupyter.Tests/Microsoft.DotNet.Interactive.Jupyter.Tests.csproj similarity index 100% rename from Microsoft.DotNet.Try.Jupyter.Tests/Microsoft.DotNet.Try.Jupyter.Tests.csproj rename to Microsoft.DotNet.Interactive.Jupyter.Tests/Microsoft.DotNet.Interactive.Jupyter.Tests.csproj diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/RecordingSocket.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/RecordingSocket.cs similarity index 91% rename from Microsoft.DotNet.Try.Jupyter.Tests/RecordingSocket.cs rename to Microsoft.DotNet.Interactive.Jupyter.Tests/RecordingSocket.cs index 37974c298..2d71c0bd7 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/RecordingSocket.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/RecordingSocket.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using NetMQ; -namespace Microsoft.DotNet.Try.Jupyter.Tests +namespace Microsoft.DotNet.Interactive.Jupyter.Tests { internal class RecordingSocket : IOutgoingSocket { diff --git a/Microsoft.DotNet.Try.Jupyter.Tests/TextSocket.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/TextSocket.cs similarity index 93% rename from Microsoft.DotNet.Try.Jupyter.Tests/TextSocket.cs rename to Microsoft.DotNet.Interactive.Jupyter.Tests/TextSocket.cs index d97ffaa9c..5d84b2a15 100644 --- a/Microsoft.DotNet.Try.Jupyter.Tests/TextSocket.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/TextSocket.cs @@ -5,7 +5,7 @@ using System.Text; using NetMQ; -namespace Microsoft.DotNet.Try.Jupyter.Tests +namespace Microsoft.DotNet.Interactive.Jupyter.Tests { internal class TextSocket : IOutgoingSocket { From b5e32beebb675ce8588e66fac5e697dda5791aac Mon Sep 17 00:00:00 2001 From: Diego Date: Fri, 19 Jul 2019 09:40:48 +0100 Subject: [PATCH 17/18] rename Microsoft.DotNet.Try.Jupyter.* to Microsoft.DotNet.Interactive.Jupyter.* rename Microsoft.DotNet.Try.Jupyter.* to Microsoft.DotNet.Interactive.Jupyter.* --- DotNetTry.sln | 14 +++++++------- MLS.Agent/CommandLine/CommandLineParser.cs | 2 +- MLS.Agent/MLS.Agent.csproj | 4 ++-- MLS.Agent/Program.cs | 2 +- .../CompleteRequestHandlerTests.cs | 3 +-- .../ExecuteRequestHandlerTests.cs | 3 +-- .../HistorySerializationTests.cs | 2 +- .../JupyterMessageContractTests.cs | 3 +-- .../KernelStatus.cs | 2 -- ...rosoft.DotNet.Interactive.Jupyter.Tests.csproj | 2 +- .../CompleteRequestHandler.cs | 4 ++-- .../ConnectionInformation.cs | 2 +- .../Constants.cs | 2 +- .../ContentFiles/kernel.json | 0 .../ContentFiles/logo-32x32.png | Bin .../ContentFiles/logo-64x64.png | Bin .../ContentFiles/readme.md | 0 .../ExecuteRequestHandler.cs | 4 ++-- .../HearthBeat.cs | 2 +- .../IMessageSender.cs | 4 ++-- .../IRequestHandlerStatus.cs | 2 +- .../JupyterRequestContext.cs | 4 ++-- .../JupyterRequestContextHandler.cs | 7 ++----- .../MessageSender.cs | 4 ++-- .../Microsoft.DotNet.Interactive.Jupyter.csproj | 0 .../NetMqExtensions.cs | 4 ++-- .../Protocol/ClearOutput.cs | 2 +- .../Protocol/CommClose.cs | 2 +- .../Protocol/CommInfoReply.cs | 2 +- .../Protocol/CommInfoRequest.cs | 2 +- .../Protocol/CommMsg.cs | 2 +- .../Protocol/CommOpen.cs | 2 +- .../Protocol/CommTarget.cs | 2 +- .../Protocol/CompleteReply.cs | 2 +- .../Protocol/CompleteRequest.cs | 2 +- .../Protocol/DisplayData.cs | 3 +-- .../Protocol/Error.cs | 2 +- .../Protocol/ExecuteInput.cs | 2 +- .../Protocol/ExecuteReply.cs | 2 +- .../Protocol/ExecuteReplyError.cs | 2 +- .../Protocol/ExecuteReplyOk.cs | 2 +- .../Protocol/ExecuteRequest.cs | 2 +- .../Protocol/ExecuteResult.cs | 2 +- .../Protocol/ExecutionStateValues.cs | 2 +- .../Protocol/Header.cs | 2 +- .../Protocol/HistoryElement.cs | 2 +- .../Protocol/HistoryReply.cs | 2 +- .../Protocol/HistoryReplyConverter.cs | 2 +- .../Protocol/HistoryRequest.cs | 3 +-- .../Protocol/InputHistoryElement.cs | 2 +- .../Protocol/InputHistoryElementConverter.cs | 2 +- .../Protocol/InputOutputHistoryElement.cs | 2 +- .../InputOutputHistoryElementConverter.cs | 2 +- .../Protocol/InputReply.cs | 2 +- .../Protocol/InputRequest.cs | 2 +- .../Protocol/InspectReply.cs | 2 +- .../Protocol/InspectRequest.cs | 2 +- .../Protocol/IsCompleteReply.cs | 2 +- .../Protocol/IsCompleteRequest.cs | 2 +- .../Protocol/JupyterMessageContent.cs | 2 +- .../Protocol/JupyterMessageTypeAttribute.cs | 2 +- .../Protocol/KernelInfoReply.cs | 2 +- .../Protocol/KernelInfoRequest.cs | 2 +- .../Protocol/LanguageInfo.cs | 2 +- .../Protocol/Link.cs | 2 +- .../Protocol/Message.cs | 3 +-- .../Protocol/MessageTypeValues.cs | 2 +- .../Protocol/ShutdownReply.cs | 2 +- .../Protocol/ShutdownRequest.cs | 2 +- .../Protocol/Status.cs | 2 +- .../Protocol/StatusValues.cs | 2 +- .../Protocol/StdErrStream.cs | 2 +- .../Protocol/StdOutStream.cs | 2 +- .../Protocol/Stream.cs | 2 +- .../Protocol/UpdateDisplayData.cs | 2 +- .../RequestHandlerBase.cs | 4 ++-- .../RequestHandlerStatus.cs | 5 ++--- .../Shell.cs | 4 ++-- .../SignatureValidator.cs | 4 ++-- WorkspaceServer.Tests/Kernel/CSharpReplTests.cs | 1 - 80 files changed, 91 insertions(+), 104 deletions(-) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/CompleteRequestHandler.cs (97%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/ConnectionInformation.cs (97%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Constants.cs (89%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/ContentFiles/kernel.json (100%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/ContentFiles/logo-32x32.png (100%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/ContentFiles/logo-64x64.png (100%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/ContentFiles/readme.md (100%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/ExecuteRequestHandler.cs (98%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/HearthBeat.cs (97%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/IMessageSender.cs (72%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/IRequestHandlerStatus.cs (85%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/JupyterRequestContext.cs (91%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/JupyterRequestContextHandler.cs (90%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/MessageSender.cs (94%) rename Microsoft.DotNet.Try.Jupyter/Microsoft.DotNet.Try.Jupyter.csproj => Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj (100%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/NetMqExtensions.cs (97%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ClearOutput.cs (89%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/CommClose.cs (94%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/CommInfoReply.cs (91%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/CommInfoRequest.cs (90%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/CommMsg.cs (94%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/CommOpen.cs (91%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/CommTarget.cs (89%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/CompleteReply.cs (95%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/CompleteRequest.cs (93%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/DisplayData.cs (94%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/Error.cs (93%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ExecuteInput.cs (91%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ExecuteReply.cs (92%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ExecuteReplyError.cs (95%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ExecuteReplyOk.cs (94%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ExecuteRequest.cs (96%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ExecuteResult.cs (93%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ExecutionStateValues.cs (87%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/Header.cs (97%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/HistoryElement.cs (89%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/HistoryReply.cs (92%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/HistoryReplyConverter.cs (96%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/HistoryRequest.cs (95%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/InputHistoryElement.cs (90%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/InputHistoryElementConverter.cs (96%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/InputOutputHistoryElement.cs (90%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/InputOutputHistoryElementConverter.cs (96%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/InputReply.cs (89%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/InputRequest.cs (91%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/InspectReply.cs (97%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/InspectRequest.cs (93%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/IsCompleteReply.cs (94%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/IsCompleteRequest.cs (90%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/JupyterMessageContent.cs (98%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/JupyterMessageTypeAttribute.cs (89%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/KernelInfoReply.cs (97%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/KernelInfoRequest.cs (84%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/LanguageInfo.cs (98%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/Link.cs (87%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/Message.cs (97%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/MessageTypeValues.cs (97%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ShutdownReply.cs (90%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/ShutdownRequest.cs (90%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/Status.cs (92%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/StatusValues.cs (89%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/StdErrStream.cs (86%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/StdOutStream.cs (86%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/Stream.cs (92%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Protocol/UpdateDisplayData.cs (91%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/RequestHandlerBase.cs (95%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/RequestHandlerStatus.cs (89%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/Shell.cs (98%) rename {Microsoft.DotNet.Try.Jupyter => Microsoft.DotNet.Interactive.Jupyter}/SignatureValidator.cs (94%) diff --git a/DotNetTry.sln b/DotNetTry.sln index 8a12c9438..183afdc31 100644 --- a/DotNetTry.sln +++ b/DotNetTry.sln @@ -35,8 +35,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MLS.WasmCodeRunner", "WasmC EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MLS.WasmCodeRunner.Tests", "WasmCodeRunner.Tests\MLS.WasmCodeRunner.Tests.csproj", "{AAEF5063-5D4C-4CA7-8E22-0DAE1ADBBCD1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Try.Jupyter", "Microsoft.DotNet.Try.Jupyter\Microsoft.DotNet.Try.Jupyter.csproj", "{DDBAB171-7BA2-4B0F-8606-7CF21B969804}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Try.Markdown", "Microsoft.DotNet.Try.Markdown\Microsoft.DotNet.Try.Markdown.csproj", "{B70584C1-41A3-4DB3-9C49-799DFF57A3FC}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Try.Markdown.Tests", "Microsoft.DotNet.Try.Markdown.Tests\Microsoft.DotNet.Try.Markdown.Tests.csproj", "{F2FEA069-3121-4AB3-8835-F4EF6FCBFA18}" @@ -61,6 +59,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactiv EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Interactive.Jupyter.Tests", "Microsoft.DotNet.Interactive.Jupyter.Tests\Microsoft.DotNet.Interactive.Jupyter.Tests.csproj", "{91902AAC-F4E9-4648-AC6B-4E4A722D3CC5}" 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 Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -123,10 +123,6 @@ Global {AAEF5063-5D4C-4CA7-8E22-0DAE1ADBBCD1}.Debug|Any CPU.Build.0 = Debug|Any CPU {AAEF5063-5D4C-4CA7-8E22-0DAE1ADBBCD1}.Release|Any CPU.ActiveCfg = Release|Any CPU {AAEF5063-5D4C-4CA7-8E22-0DAE1ADBBCD1}.Release|Any CPU.Build.0 = Release|Any CPU - {DDBAB171-7BA2-4B0F-8606-7CF21B969804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DDBAB171-7BA2-4B0F-8606-7CF21B969804}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DDBAB171-7BA2-4B0F-8606-7CF21B969804}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DDBAB171-7BA2-4B0F-8606-7CF21B969804}.Release|Any CPU.Build.0 = Release|Any CPU {B70584C1-41A3-4DB3-9C49-799DFF57A3FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B70584C1-41A3-4DB3-9C49-799DFF57A3FC}.Debug|Any CPU.Build.0 = Debug|Any CPU {B70584C1-41A3-4DB3-9C49-799DFF57A3FC}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -175,6 +171,10 @@ Global {91902AAC-F4E9-4648-AC6B-4E4A722D3CC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {91902AAC-F4E9-4648-AC6B-4E4A722D3CC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {91902AAC-F4E9-4648-AC6B-4E4A722D3CC5}.Release|Any CPU.Build.0 = Release|Any CPU + {113A4166-5734-4F6E-B609-D6CF42679399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -194,7 +194,6 @@ Global {F228EC10-315A-41CF-A51E-FC8369552632} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} {9DAE862E-C8AE-452B-B27E-C6DEB1403E81} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} {AAEF5063-5D4C-4CA7-8E22-0DAE1ADBBCD1} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} - {DDBAB171-7BA2-4B0F-8606-7CF21B969804} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} {B70584C1-41A3-4DB3-9C49-799DFF57A3FC} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} {F2FEA069-3121-4AB3-8835-F4EF6FCBFA18} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} {7EAD5482-90CC-4252-AF91-553A4B81D8E0} = {6EE8F484-DFA2-4F0F-939F-400CE78DFAC2} @@ -206,6 +205,7 @@ Global {EA6DDD48-941D-43C6-BAC1-07CF24F4C792} = {8192FEAD-BCE6-4E62-97E5-2E9EA884BD71} {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} 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 718b97f34..7f0e84061 100644 --- a/MLS.Agent/CommandLine/CommandLineParser.cs +++ b/MLS.Agent/CommandLine/CommandLineParser.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; using Clockwise; using Microsoft.AspNetCore.Hosting; -using Microsoft.DotNet.Try.Jupyter; +using Microsoft.DotNet.Interactive.Jupyter; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using MLS.Agent.Markdown; diff --git a/MLS.Agent/MLS.Agent.csproj b/MLS.Agent/MLS.Agent.csproj index 0f136ee93..87e2878b4 100644 --- a/MLS.Agent/MLS.Agent.csproj +++ b/MLS.Agent/MLS.Agent.csproj @@ -101,12 +101,12 @@ + - @@ -125,7 +125,7 @@ - + diff --git a/MLS.Agent/Program.cs b/MLS.Agent/Program.cs index fc577e447..6d2762587 100644 --- a/MLS.Agent/Program.cs +++ b/MLS.Agent/Program.cs @@ -17,7 +17,7 @@ using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; -using Microsoft.DotNet.Try.Jupyter; +using Microsoft.DotNet.Interactive.Jupyter; using static Pocket.Logger; using SerilogLoggerConfiguration = Serilog.LoggerConfiguration; using MLS.Agent.CommandLine; diff --git a/Microsoft.DotNet.Interactive.Jupyter.Tests/CompleteRequestHandlerTests.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/CompleteRequestHandlerTests.cs index e4eee4f47..be43b1910 100644 --- a/Microsoft.DotNet.Interactive.Jupyter.Tests/CompleteRequestHandlerTests.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/CompleteRequestHandlerTests.cs @@ -4,8 +4,7 @@ using System; using System.Threading.Tasks; using FluentAssertions; -using Microsoft.DotNet.Try.Jupyter; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using WorkspaceServer.Kernel; using Xunit; diff --git a/Microsoft.DotNet.Interactive.Jupyter.Tests/ExecuteRequestHandlerTests.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/ExecuteRequestHandlerTests.cs index 91a0c7dfa..10bfbc2e9 100644 --- a/Microsoft.DotNet.Interactive.Jupyter.Tests/ExecuteRequestHandlerTests.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/ExecuteRequestHandlerTests.cs @@ -4,8 +4,7 @@ using System; using System.Threading.Tasks; using FluentAssertions; -using Microsoft.DotNet.Try.Jupyter; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using WorkspaceServer.Kernel; using Xunit; diff --git a/Microsoft.DotNet.Interactive.Jupyter.Tests/HistorySerializationTests.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/HistorySerializationTests.cs index e26ce404e..433a94135 100644 --- a/Microsoft.DotNet.Interactive.Jupyter.Tests/HistorySerializationTests.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/HistorySerializationTests.cs @@ -2,7 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using Newtonsoft.Json; using Xunit; diff --git a/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.cs index 624ef5544..02c329c99 100644 --- a/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/JupyterMessageContractTests.cs @@ -4,8 +4,7 @@ using System; using System.Collections.Generic; using Assent; -using Microsoft.DotNet.Try.Jupyter; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using Xunit; namespace Microsoft.DotNet.Interactive.Jupyter.Tests diff --git a/Microsoft.DotNet.Interactive.Jupyter.Tests/KernelStatus.cs b/Microsoft.DotNet.Interactive.Jupyter.Tests/KernelStatus.cs index 1a724a918..ede4581fd 100644 --- a/Microsoft.DotNet.Interactive.Jupyter.Tests/KernelStatus.cs +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/KernelStatus.cs @@ -1,8 +1,6 @@ // 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 Microsoft.DotNet.Try.Jupyter; - namespace Microsoft.DotNet.Interactive.Jupyter.Tests { class KernelStatus : IRequestHandlerStatus diff --git a/Microsoft.DotNet.Interactive.Jupyter.Tests/Microsoft.DotNet.Interactive.Jupyter.Tests.csproj b/Microsoft.DotNet.Interactive.Jupyter.Tests/Microsoft.DotNet.Interactive.Jupyter.Tests.csproj index 0a15a4de4..28875454a 100644 --- a/Microsoft.DotNet.Interactive.Jupyter.Tests/Microsoft.DotNet.Interactive.Jupyter.Tests.csproj +++ b/Microsoft.DotNet.Interactive.Jupyter.Tests/Microsoft.DotNet.Interactive.Jupyter.Tests.csproj @@ -34,7 +34,7 @@ - + diff --git a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs b/Microsoft.DotNet.Interactive.Jupyter/CompleteRequestHandler.cs similarity index 97% rename from Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs rename to Microsoft.DotNet.Interactive.Jupyter/CompleteRequestHandler.cs index ac5b94f1a..3291d8c23 100644 --- a/Microsoft.DotNet.Try.Jupyter/CompleteRequestHandler.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/CompleteRequestHandler.cs @@ -6,10 +6,10 @@ using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using WorkspaceServer.Kernel; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public class CompleteRequestHandler: RequestHandlerBase { diff --git a/Microsoft.DotNet.Try.Jupyter/ConnectionInformation.cs b/Microsoft.DotNet.Interactive.Jupyter/ConnectionInformation.cs similarity index 97% rename from Microsoft.DotNet.Try.Jupyter/ConnectionInformation.cs rename to Microsoft.DotNet.Interactive.Jupyter/ConnectionInformation.cs index c9986684e..009a403a8 100644 --- a/Microsoft.DotNet.Try.Jupyter/ConnectionInformation.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/ConnectionInformation.cs @@ -5,7 +5,7 @@ using System.IO; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public class ConnectionInformation { diff --git a/Microsoft.DotNet.Try.Jupyter/Constants.cs b/Microsoft.DotNet.Interactive.Jupyter/Constants.cs similarity index 89% rename from Microsoft.DotNet.Try.Jupyter/Constants.cs rename to Microsoft.DotNet.Interactive.Jupyter/Constants.cs index 840bb8519..a59ce75b1 100644 --- a/Microsoft.DotNet.Try.Jupyter/Constants.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Constants.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 Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public static class Constants { diff --git a/Microsoft.DotNet.Try.Jupyter/ContentFiles/kernel.json b/Microsoft.DotNet.Interactive.Jupyter/ContentFiles/kernel.json similarity index 100% rename from Microsoft.DotNet.Try.Jupyter/ContentFiles/kernel.json rename to Microsoft.DotNet.Interactive.Jupyter/ContentFiles/kernel.json diff --git a/Microsoft.DotNet.Try.Jupyter/ContentFiles/logo-32x32.png b/Microsoft.DotNet.Interactive.Jupyter/ContentFiles/logo-32x32.png similarity index 100% rename from Microsoft.DotNet.Try.Jupyter/ContentFiles/logo-32x32.png rename to Microsoft.DotNet.Interactive.Jupyter/ContentFiles/logo-32x32.png diff --git a/Microsoft.DotNet.Try.Jupyter/ContentFiles/logo-64x64.png b/Microsoft.DotNet.Interactive.Jupyter/ContentFiles/logo-64x64.png similarity index 100% rename from Microsoft.DotNet.Try.Jupyter/ContentFiles/logo-64x64.png rename to Microsoft.DotNet.Interactive.Jupyter/ContentFiles/logo-64x64.png diff --git a/Microsoft.DotNet.Try.Jupyter/ContentFiles/readme.md b/Microsoft.DotNet.Interactive.Jupyter/ContentFiles/readme.md similarity index 100% rename from Microsoft.DotNet.Try.Jupyter/ContentFiles/readme.md rename to Microsoft.DotNet.Interactive.Jupyter/ContentFiles/readme.md diff --git a/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs b/Microsoft.DotNet.Interactive.Jupyter/ExecuteRequestHandler.cs similarity index 98% rename from Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs rename to Microsoft.DotNet.Interactive.Jupyter/ExecuteRequestHandler.cs index 9763e2536..d6f559e44 100644 --- a/Microsoft.DotNet.Try.Jupyter/ExecuteRequestHandler.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/ExecuteRequestHandler.cs @@ -7,10 +7,10 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using WorkspaceServer.Kernel; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public class ExecuteRequestHandler : RequestHandlerBase { diff --git a/Microsoft.DotNet.Try.Jupyter/HearthBeat.cs b/Microsoft.DotNet.Interactive.Jupyter/HearthBeat.cs similarity index 97% rename from Microsoft.DotNet.Try.Jupyter/HearthBeat.cs rename to Microsoft.DotNet.Interactive.Jupyter/HearthBeat.cs index 2aea18df6..5a14a0188 100644 --- a/Microsoft.DotNet.Try.Jupyter/HearthBeat.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/HearthBeat.cs @@ -9,7 +9,7 @@ using NetMQ.Sockets; using Pocket; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public class Heartbeat : IHostedService { diff --git a/Microsoft.DotNet.Try.Jupyter/IMessageSender.cs b/Microsoft.DotNet.Interactive.Jupyter/IMessageSender.cs similarity index 72% rename from Microsoft.DotNet.Try.Jupyter/IMessageSender.cs rename to Microsoft.DotNet.Interactive.Jupyter/IMessageSender.cs index 82ee4867b..568f27571 100644 --- a/Microsoft.DotNet.Try.Jupyter/IMessageSender.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/IMessageSender.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 Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public interface IMessageSender { diff --git a/Microsoft.DotNet.Try.Jupyter/IRequestHandlerStatus.cs b/Microsoft.DotNet.Interactive.Jupyter/IRequestHandlerStatus.cs similarity index 85% rename from Microsoft.DotNet.Try.Jupyter/IRequestHandlerStatus.cs rename to Microsoft.DotNet.Interactive.Jupyter/IRequestHandlerStatus.cs index 7b800208e..4bb45bccc 100644 --- a/Microsoft.DotNet.Try.Jupyter/IRequestHandlerStatus.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/IRequestHandlerStatus.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 Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public interface IRequestHandlerStatus { diff --git a/Microsoft.DotNet.Try.Jupyter/JupyterRequestContext.cs b/Microsoft.DotNet.Interactive.Jupyter/JupyterRequestContext.cs similarity index 91% rename from Microsoft.DotNet.Try.Jupyter/JupyterRequestContext.cs rename to Microsoft.DotNet.Interactive.Jupyter/JupyterRequestContext.cs index ae805b56c..01bddedc6 100644 --- a/Microsoft.DotNet.Try.Jupyter/JupyterRequestContext.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/JupyterRequestContext.cs @@ -2,9 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public class JupyterRequestContext { diff --git a/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs b/Microsoft.DotNet.Interactive.Jupyter/JupyterRequestContextHandler.cs similarity index 90% rename from Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs rename to Microsoft.DotNet.Interactive.Jupyter/JupyterRequestContextHandler.cs index 8b5c1ca25..70217f913 100644 --- a/Microsoft.DotNet.Try.Jupyter/JupyterRequestContextHandler.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/JupyterRequestContextHandler.cs @@ -2,18 +2,15 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; -using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using Clockwise; -using Microsoft.DotNet.Try.Jupyter.Protocol; -using Microsoft.DotNet.Try.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using WorkspaceServer; using WorkspaceServer.Kernel; using WorkspaceServer.Servers; -using Buffer = Microsoft.DotNet.Try.Protocol.Buffer; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public class JupyterRequestContextHandler : ICommandHandler { diff --git a/Microsoft.DotNet.Try.Jupyter/MessageSender.cs b/Microsoft.DotNet.Interactive.Jupyter/MessageSender.cs similarity index 94% rename from Microsoft.DotNet.Try.Jupyter/MessageSender.cs rename to Microsoft.DotNet.Interactive.Jupyter/MessageSender.cs index 95b0eba1a..fdddfcb20 100644 --- a/Microsoft.DotNet.Try.Jupyter/MessageSender.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/MessageSender.cs @@ -3,11 +3,11 @@ using System; using System.Linq; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using NetMQ; using Recipes; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public class MessageSender : IMessageSender { diff --git a/Microsoft.DotNet.Try.Jupyter/Microsoft.DotNet.Try.Jupyter.csproj b/Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj similarity index 100% rename from Microsoft.DotNet.Try.Jupyter/Microsoft.DotNet.Try.Jupyter.csproj rename to Microsoft.DotNet.Interactive.Jupyter/Microsoft.DotNet.Interactive.Jupyter.csproj diff --git a/Microsoft.DotNet.Try.Jupyter/NetMqExtensions.cs b/Microsoft.DotNet.Interactive.Jupyter/NetMqExtensions.cs similarity index 97% rename from Microsoft.DotNet.Try.Jupyter/NetMqExtensions.cs rename to Microsoft.DotNet.Interactive.Jupyter/NetMqExtensions.cs index e95833bfc..03b5bbf4c 100644 --- a/Microsoft.DotNet.Try.Jupyter/NetMqExtensions.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/NetMqExtensions.cs @@ -4,12 +4,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using NetMQ; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public static class NetMQExtensions { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ClearOutput.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ClearOutput.cs similarity index 89% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ClearOutput.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ClearOutput.cs index a68047531..b990c47eb 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ClearOutput.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ClearOutput.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.ClearOutput)] public class ClearOutput : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/CommClose.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommClose.cs similarity index 94% rename from Microsoft.DotNet.Try.Jupyter/Protocol/CommClose.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/CommClose.cs index 3ddd4725d..18cfc596e 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/CommClose.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommClose.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.CommClose)] public class CommClose : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/CommInfoReply.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommInfoReply.cs similarity index 91% rename from Microsoft.DotNet.Try.Jupyter/Protocol/CommInfoReply.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/CommInfoReply.cs index c93695eed..7a4452afd 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/CommInfoReply.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommInfoReply.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.CommInfoReply)] public class CommInfoReply : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/CommInfoRequest.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommInfoRequest.cs similarity index 90% rename from Microsoft.DotNet.Try.Jupyter/Protocol/CommInfoRequest.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/CommInfoRequest.cs index bf07d959f..dcf508d43 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/CommInfoRequest.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommInfoRequest.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.CommInfoRequest)] public class CommInfoRequest : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/CommMsg.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommMsg.cs similarity index 94% rename from Microsoft.DotNet.Try.Jupyter/Protocol/CommMsg.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/CommMsg.cs index cc4cc8956..f986349f5 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/CommMsg.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommMsg.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.CommMsg)] public class CommMsg : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/CommOpen.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommOpen.cs similarity index 91% rename from Microsoft.DotNet.Try.Jupyter/Protocol/CommOpen.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/CommOpen.cs index 3e4318d02..b744eb460 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/CommOpen.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommOpen.cs @@ -4,7 +4,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.CommOpen)] public class CommOpen : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/CommTarget.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommTarget.cs similarity index 89% rename from Microsoft.DotNet.Try.Jupyter/Protocol/CommTarget.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/CommTarget.cs index b75527aa5..8a3598925 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/CommTarget.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CommTarget.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public class CommTarget { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/CompleteReply.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CompleteReply.cs similarity index 95% rename from Microsoft.DotNet.Try.Jupyter/Protocol/CompleteReply.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/CompleteReply.cs index 94b147486..ddf4a0f75 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/CompleteReply.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CompleteReply.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.CompleteReply)] public class CompleteReply : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/CompleteRequest.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CompleteRequest.cs similarity index 93% rename from Microsoft.DotNet.Try.Jupyter/Protocol/CompleteRequest.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/CompleteRequest.cs index 5b51a2dd0..c29c760d3 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/CompleteRequest.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/CompleteRequest.cs @@ -4,7 +4,7 @@ using System; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.CompleteRequest)] public class CompleteRequest : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/DisplayData.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/DisplayData.cs similarity index 94% rename from Microsoft.DotNet.Try.Jupyter/Protocol/DisplayData.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/DisplayData.cs index 18363a904..7d8232c3a 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/DisplayData.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/DisplayData.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.DisplayData)] public class DisplayData : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/Error.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Error.cs similarity index 93% rename from Microsoft.DotNet.Try.Jupyter/Protocol/Error.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/Error.cs index ec6def29d..8091e6775 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/Error.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Error.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.Error)] public class Error : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteInput.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteInput.cs similarity index 91% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteInput.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteInput.cs index f068bca22..8cd92229f 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteInput.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteInput.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.ExecuteInput)] public class ExecuteInput : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteReply.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteReply.cs similarity index 92% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteReply.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteReply.cs index fa9aee918..fe53c09f7 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteReply.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteReply.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.ExecuteReply)] public class ExecuteReply : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteReplyError.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteReplyError.cs similarity index 95% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteReplyError.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteReplyError.cs index c84a1cec9..cf8f61a90 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteReplyError.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteReplyError.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.ExecuteReply)] public class ExecuteReplyError : ExecuteReply diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteReplyOk.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteReplyOk.cs similarity index 94% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteReplyOk.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteReplyOk.cs index 30453eaa5..291cad222 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteReplyOk.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteReplyOk.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.ExecuteReply)] public class ExecuteReplyOk : ExecuteReply diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteRequest.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteRequest.cs similarity index 96% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteRequest.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteRequest.cs index 1f02b9796..f2e506769 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteRequest.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteRequest.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.ExecuteRequest)] public class ExecuteRequest : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteResult.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteResult.cs similarity index 93% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteResult.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteResult.cs index 53e63cb8d..4871ac62f 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecuteResult.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecuteResult.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.ExecuteResult)] public class ExecuteResult : DisplayData diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecutionStateValues.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecutionStateValues.cs similarity index 87% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ExecutionStateValues.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecutionStateValues.cs index 290f904ff..468158660 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ExecutionStateValues.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ExecutionStateValues.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 Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public static class ExecutionStateValues { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/Header.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Header.cs similarity index 97% rename from Microsoft.DotNet.Try.Jupyter/Protocol/Header.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/Header.cs index 41a7fd6f6..d1676e51f 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/Header.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Header.cs @@ -4,7 +4,7 @@ using System; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public class Header { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/HistoryElement.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryElement.cs similarity index 89% rename from Microsoft.DotNet.Try.Jupyter/Protocol/HistoryElement.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryElement.cs index 71deb3af4..18687aea8 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/HistoryElement.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryElement.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 Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public abstract class HistoryElement { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/HistoryReply.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryReply.cs similarity index 92% rename from Microsoft.DotNet.Try.Jupyter/Protocol/HistoryReply.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryReply.cs index da92554ee..9f7399fab 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/HistoryReply.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryReply.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JsonConverter(typeof(HistoryReplyConverter))] [JupyterMessageType(MessageTypeValues.HistoryReply)] diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/HistoryReplyConverter.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryReplyConverter.cs similarity index 96% rename from Microsoft.DotNet.Try.Jupyter/Protocol/HistoryReplyConverter.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryReplyConverter.cs index fbc23b61a..92c4e0a4c 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/HistoryReplyConverter.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryReplyConverter.cs @@ -7,7 +7,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public class HistoryReplyConverter : JsonConverter { public override bool CanRead { get; } = true; diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/HistoryRequest.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryRequest.cs similarity index 95% rename from Microsoft.DotNet.Try.Jupyter/Protocol/HistoryRequest.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryRequest.cs index 926752f84..6b4f74f4e 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/HistoryRequest.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/HistoryRequest.cs @@ -1,10 +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 Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.HistoryRequest)] public class HistoryRequest : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/InputHistoryElement.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputHistoryElement.cs similarity index 90% rename from Microsoft.DotNet.Try.Jupyter/Protocol/InputHistoryElement.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/InputHistoryElement.cs index e414e6360..199d42a2d 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/InputHistoryElement.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputHistoryElement.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JsonConverter(typeof(InputHistoryElementConverter))] public class InputHistoryElement: HistoryElement diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/InputHistoryElementConverter.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputHistoryElementConverter.cs similarity index 96% rename from Microsoft.DotNet.Try.Jupyter/Protocol/InputHistoryElementConverter.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/InputHistoryElementConverter.cs index cd9e8b019..c8ae7e308 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/InputHistoryElementConverter.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputHistoryElementConverter.cs @@ -5,7 +5,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public class InputHistoryElementConverter : JsonConverter { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/InputOutputHistoryElement.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputOutputHistoryElement.cs similarity index 90% rename from Microsoft.DotNet.Try.Jupyter/Protocol/InputOutputHistoryElement.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/InputOutputHistoryElement.cs index 768856a77..1786f681e 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/InputOutputHistoryElement.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputOutputHistoryElement.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JsonConverter(typeof(InputOutputHistoryElementConverter))] public class InputOutputHistoryElement : InputHistoryElement diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/InputOutputHistoryElementConverter.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputOutputHistoryElementConverter.cs similarity index 96% rename from Microsoft.DotNet.Try.Jupyter/Protocol/InputOutputHistoryElementConverter.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/InputOutputHistoryElementConverter.cs index fc23c937c..51de950c8 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/InputOutputHistoryElementConverter.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputOutputHistoryElementConverter.cs @@ -6,7 +6,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public class InputOutputHistoryElementConverter : JsonConverter { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/InputReply.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputReply.cs similarity index 89% rename from Microsoft.DotNet.Try.Jupyter/Protocol/InputReply.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/InputReply.cs index 46b7a37d9..689df41bb 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/InputReply.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputReply.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.InputReply)] public class InputReply : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/InputRequest.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputRequest.cs similarity index 91% rename from Microsoft.DotNet.Try.Jupyter/Protocol/InputRequest.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/InputRequest.cs index add969f15..5a04e5615 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/InputRequest.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InputRequest.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.InputRequest)] public class InputRequest : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/InspectReply.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InspectReply.cs similarity index 97% rename from Microsoft.DotNet.Try.Jupyter/Protocol/InspectReply.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/InspectReply.cs index c14c1cadb..dce75a783 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/InspectReply.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InspectReply.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.InspectReply)] public class InspectReply : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/InspectRequest.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InspectRequest.cs similarity index 93% rename from Microsoft.DotNet.Try.Jupyter/Protocol/InspectRequest.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/InspectRequest.cs index c5401824c..1a47af499 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/InspectRequest.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/InspectRequest.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.InspectRequest)] public class InspectRequest : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/IsCompleteReply.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/IsCompleteReply.cs similarity index 94% rename from Microsoft.DotNet.Try.Jupyter/Protocol/IsCompleteReply.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/IsCompleteReply.cs index 4037e6096..e89d02da2 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/IsCompleteReply.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/IsCompleteReply.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.IsCompleteReply)] public class IsCompleteReply : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/IsCompleteRequest.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/IsCompleteRequest.cs similarity index 90% rename from Microsoft.DotNet.Try.Jupyter/Protocol/IsCompleteRequest.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/IsCompleteRequest.cs index 9da45f7df..fd4eeab96 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/IsCompleteRequest.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/IsCompleteRequest.cs @@ -4,7 +4,7 @@ using System; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.IsCompleteRequest)] public class IsCompleteRequest : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/JupyterMessageContent.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/JupyterMessageContent.cs similarity index 98% rename from Microsoft.DotNet.Try.Jupyter/Protocol/JupyterMessageContent.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/JupyterMessageContent.cs index ca3935eae..7b5436f9e 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/JupyterMessageContent.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/JupyterMessageContent.cs @@ -8,7 +8,7 @@ using System.Reflection; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public abstract class JupyterMessageContent { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/JupyterMessageTypeAttribute.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/JupyterMessageTypeAttribute.cs similarity index 89% rename from Microsoft.DotNet.Try.Jupyter/Protocol/JupyterMessageTypeAttribute.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/JupyterMessageTypeAttribute.cs index a1b6ce044..2c0f2d10d 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/JupyterMessageTypeAttribute.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/JupyterMessageTypeAttribute.cs @@ -3,7 +3,7 @@ using System; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] sealed class JupyterMessageTypeAttribute : Attribute diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/KernelInfoReply.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/KernelInfoReply.cs similarity index 97% rename from Microsoft.DotNet.Try.Jupyter/Protocol/KernelInfoReply.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/KernelInfoReply.cs index ac091257a..87ba0d4d4 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/KernelInfoReply.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/KernelInfoReply.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.KernelInfoReply)] public class KernelInfoReply : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/KernelInfoRequest.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/KernelInfoRequest.cs similarity index 84% rename from Microsoft.DotNet.Try.Jupyter/Protocol/KernelInfoRequest.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/KernelInfoRequest.cs index f0d45d334..3531db9e6 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/KernelInfoRequest.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/KernelInfoRequest.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 Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.KernelInfoRequest)] public class KernelInfoRequest : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/LanguageInfo.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/LanguageInfo.cs similarity index 98% rename from Microsoft.DotNet.Try.Jupyter/Protocol/LanguageInfo.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/LanguageInfo.cs index d75f1c88a..17c156512 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/LanguageInfo.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/LanguageInfo.cs @@ -4,7 +4,7 @@ using System; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public class LanguageInfo { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/Link.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Link.cs similarity index 87% rename from Microsoft.DotNet.Try.Jupyter/Protocol/Link.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/Link.cs index 866494844..b72326d84 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/Link.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Link.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public class Link { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/Message.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Message.cs similarity index 97% rename from Microsoft.DotNet.Try.Jupyter/Protocol/Message.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/Message.cs index 9f52bb40d..29f6838de 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/Message.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Message.cs @@ -3,10 +3,9 @@ using System; using System.Collections.Generic; -using System.Reflection; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public class Message { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/MessageTypeValues.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/MessageTypeValues.cs similarity index 97% rename from Microsoft.DotNet.Try.Jupyter/Protocol/MessageTypeValues.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/MessageTypeValues.cs index d684f7148..0be82eca5 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/MessageTypeValues.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/MessageTypeValues.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 Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public class MessageTypeValues { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ShutdownReply.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ShutdownReply.cs similarity index 90% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ShutdownReply.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ShutdownReply.cs index 3a5c3fac7..2e7186c27 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ShutdownReply.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ShutdownReply.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.KernelShutdownReply)] public class ShutdownReply : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/ShutdownRequest.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ShutdownRequest.cs similarity index 90% rename from Microsoft.DotNet.Try.Jupyter/Protocol/ShutdownRequest.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/ShutdownRequest.cs index 0f643d854..477c38730 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/ShutdownRequest.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/ShutdownRequest.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.KernelShutdownRequest)] public class ShutdownRequest : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/Status.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Status.cs similarity index 92% rename from Microsoft.DotNet.Try.Jupyter/Protocol/Status.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/Status.cs index 779da6a59..23a0e991b 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/Status.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Status.cs @@ -5,7 +5,7 @@ using System; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.Status)] public class Status : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/StatusValues.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/StatusValues.cs similarity index 89% rename from Microsoft.DotNet.Try.Jupyter/Protocol/StatusValues.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/StatusValues.cs index f48265a54..7a77163ed 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/StatusValues.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/StatusValues.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 Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public static class StatusValues { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/StdErrStream.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/StdErrStream.cs similarity index 86% rename from Microsoft.DotNet.Try.Jupyter/Protocol/StdErrStream.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/StdErrStream.cs index 6e0ba473c..ad32e41b5 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/StdErrStream.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/StdErrStream.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 Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.Stream)] public class StdErrStream : Stream diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/StdOutStream.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/StdOutStream.cs similarity index 86% rename from Microsoft.DotNet.Try.Jupyter/Protocol/StdOutStream.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/StdOutStream.cs index 74163b056..865eabfb1 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/StdOutStream.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/StdOutStream.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 Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.Stream)] public class StdOutStream : Stream diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/Stream.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Stream.cs similarity index 92% rename from Microsoft.DotNet.Try.Jupyter/Protocol/Stream.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/Stream.cs index 080cce4ea..9b6e2a681 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/Stream.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/Stream.cs @@ -4,7 +4,7 @@ using System; using Newtonsoft.Json; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { public abstract class Stream : JupyterMessageContent { diff --git a/Microsoft.DotNet.Try.Jupyter/Protocol/UpdateDisplayData.cs b/Microsoft.DotNet.Interactive.Jupyter/Protocol/UpdateDisplayData.cs similarity index 91% rename from Microsoft.DotNet.Try.Jupyter/Protocol/UpdateDisplayData.cs rename to Microsoft.DotNet.Interactive.Jupyter/Protocol/UpdateDisplayData.cs index 8f35f3418..f6f4b0f92 100644 --- a/Microsoft.DotNet.Try.Jupyter/Protocol/UpdateDisplayData.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Protocol/UpdateDisplayData.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; -namespace Microsoft.DotNet.Try.Jupyter.Protocol +namespace Microsoft.DotNet.Interactive.Jupyter.Protocol { [JupyterMessageType(MessageTypeValues.UpdateDisplayData)] public class UpdateDisplayData : DisplayData diff --git a/Microsoft.DotNet.Try.Jupyter/RequestHandlerBase.cs b/Microsoft.DotNet.Interactive.Jupyter/RequestHandlerBase.cs similarity index 95% rename from Microsoft.DotNet.Try.Jupyter/RequestHandlerBase.cs rename to Microsoft.DotNet.Interactive.Jupyter/RequestHandlerBase.cs index 08d6d6707..9e855ec23 100644 --- a/Microsoft.DotNet.Try.Jupyter/RequestHandlerBase.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/RequestHandlerBase.cs @@ -5,10 +5,10 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Reactive.Disposables; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using WorkspaceServer.Kernel; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public abstract class RequestHandlerBase : IDisposable where T : JupyterMessageContent diff --git a/Microsoft.DotNet.Try.Jupyter/RequestHandlerStatus.cs b/Microsoft.DotNet.Interactive.Jupyter/RequestHandlerStatus.cs similarity index 89% rename from Microsoft.DotNet.Try.Jupyter/RequestHandlerStatus.cs rename to Microsoft.DotNet.Interactive.Jupyter/RequestHandlerStatus.cs index d17138d8b..9a4a96af4 100644 --- a/Microsoft.DotNet.Try.Jupyter/RequestHandlerStatus.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/RequestHandlerStatus.cs @@ -1,10 +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 Microsoft.DotNet.Try.Jupyter.Protocol; -using Newtonsoft.Json.Linq; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { internal class RequestHandlerStatus : IRequestHandlerStatus { diff --git a/Microsoft.DotNet.Try.Jupyter/Shell.cs b/Microsoft.DotNet.Interactive.Jupyter/Shell.cs similarity index 98% rename from Microsoft.DotNet.Try.Jupyter/Shell.cs rename to Microsoft.DotNet.Interactive.Jupyter/Shell.cs index b83c32158..595a25738 100644 --- a/Microsoft.DotNet.Try.Jupyter/Shell.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/Shell.cs @@ -6,13 +6,13 @@ using System.Threading; using System.Threading.Tasks; using Clockwise; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using Microsoft.Extensions.Hosting; using NetMQ.Sockets; using Pocket; using Recipes; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public class Shell : IHostedService { diff --git a/Microsoft.DotNet.Try.Jupyter/SignatureValidator.cs b/Microsoft.DotNet.Interactive.Jupyter/SignatureValidator.cs similarity index 94% rename from Microsoft.DotNet.Try.Jupyter/SignatureValidator.cs rename to Microsoft.DotNet.Interactive.Jupyter/SignatureValidator.cs index 4cb3ecf4e..0b2c586c3 100644 --- a/Microsoft.DotNet.Try.Jupyter/SignatureValidator.cs +++ b/Microsoft.DotNet.Interactive.Jupyter/SignatureValidator.cs @@ -5,10 +5,10 @@ using System.Collections.Generic; using System.Security.Cryptography; using System.Text; -using Microsoft.DotNet.Try.Jupyter.Protocol; +using Microsoft.DotNet.Interactive.Jupyter.Protocol; using Recipes; -namespace Microsoft.DotNet.Try.Jupyter +namespace Microsoft.DotNet.Interactive.Jupyter { public class SignatureValidator { diff --git a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs index ba09e833e..fcfdf5510 100644 --- a/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs +++ b/WorkspaceServer.Tests/Kernel/CSharpReplTests.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Scripting; -using Microsoft.DotNet.Try.Jupyter.Protocol; using Newtonsoft.Json; using Recipes; using WorkspaceServer.Kernel; From 6b16952c486c27ce0097be10f3115031fc3d6f1a Mon Sep 17 00:00:00 2001 From: Diego Date: Fri, 19 Jul 2019 09:43:24 +0100 Subject: [PATCH 18/18] clean unused namespaces --- WorkspaceServer/Kernel/CSharpReplExtensions.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/WorkspaceServer/Kernel/CSharpReplExtensions.cs b/WorkspaceServer/Kernel/CSharpReplExtensions.cs index 30ea82c6a..da80d73aa 100644 --- a/WorkspaceServer/Kernel/CSharpReplExtensions.cs +++ b/WorkspaceServer/Kernel/CSharpReplExtensions.cs @@ -1,7 +1,6 @@ // 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 System.CommandLine; using System.CommandLine.Invocation;