From adc24fd301f6c0eb72a2894c17357ea21aee1d4a Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 29 Dec 2015 12:29:13 -0800 Subject: [PATCH] Adding support for seeding the repl with a project context. --- src/Microsoft.DotNet.Cli.Utils/Constants.cs | 2 + .../Program.cs | 122 +++++++++++++++++- 2 files changed, 119 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.DotNet.Cli.Utils/Constants.cs b/src/Microsoft.DotNet.Cli.Utils/Constants.cs index 378a0c3db..851504b57 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Constants.cs +++ b/src/Microsoft.DotNet.Cli.Utils/Constants.cs @@ -33,5 +33,7 @@ namespace Microsoft.DotNet.Cli.Utils RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "osx.10.10-x64" : "ubuntu.14.04-x64"; public static readonly string StaticLibSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".lib" : ".a" ; + + public static readonly string ResponseFileSuffix = ".rsp"; } } diff --git a/src/Microsoft.DotNet.Tools.Repl.Csi/Program.cs b/src/Microsoft.DotNet.Tools.Repl.Csi/Program.cs index 8bbb4c70d..64faf869b 100644 --- a/src/Microsoft.DotNet.Tools.Repl.Csi/Program.cs +++ b/src/Microsoft.DotNet.Tools.Repl.Csi/Program.cs @@ -2,9 +2,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using System.Collections.Generic; +using System.Linq; using System.IO; +using System.Text; using Microsoft.Dnx.Runtime.Common.CommandLine; using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.ProjectModel; +using NuGet.Frameworks; namespace Microsoft.DotNet.Tools.Repl.Csi { @@ -19,21 +24,128 @@ namespace Microsoft.DotNet.Tools.Repl.Csi app.FullName = "C# REPL"; app.Description = "C# REPL for the .NET platform"; app.HelpOption("-h|--help"); - var script = app.Argument("