public static ICommandBuilderContext <TNewContext> SetName <TNewContext>(this ICommandBuilderContext <TNewContext> newSlnContext, string solutionName)
            where TNewContext : NewContext
        {
            newSlnContext.CommandBuilder.AppendNameValuePair("--name", solutionName);

            return(newSlnContext);
        }
        public static ICommandBuilderContext <TNewContext> SetLanguage <TNewContext>(this ICommandBuilderContext <TNewContext> newProjectContext, string language)
            where TNewContext : NewContext
        {
            newProjectContext.CommandBuilder.AppendNameValuePair("--language", language);

            return(newProjectContext);
        }
예제 #3
0
        public static ICommandBuilderContext <NewContext> New(this ICommandBuilderContext <DotnetContext> dotnetContext)
        {
            dotnetContext.Append("new");

            var dotnetNewContext = dotnetContext.ChangeContext <NewContext>();

            return(dotnetNewContext);
        }
예제 #4
0
        public static ICommandBuilderContext <SlnAddContext> Add(this ICommandBuilderContext <SlnSolutionFileSetContext> solutionSpecifiedContext)
        {
            solutionSpecifiedContext.Append("add");

            var slnAddContext = solutionSpecifiedContext.ChangeContext <SlnAddContext>();

            return(slnAddContext);
        }
예제 #5
0
        public static ICommandBuilderContext <PublishContext> Publish(this ICommandBuilderContext <DotnetContext> dotnetContext)
        {
            dotnetContext.Append("publish");

            var publishContext = dotnetContext.ChangeContext <PublishContext>();

            return(publishContext);
        }
        /// <summary>
        /// Requires the "sln2019" dotnet new template available at: https://www.nuget.org/packages/R5T.Templates.Solution.VS2019/.
        /// </summary>
        public static ICommandBuilderContext <NewSolution2019Context> Solution2019(this ICommandBuilderContext <NewContext> newContext)
        {
            newContext.CommandBuilder.Append("sln2019");

            var solution2019Context = newContext.ChangeContext <NewSolution2019Context>();

            return(solution2019Context);
        }
예제 #7
0
        public static ICommandBuilderContext <FinishedContext> Add(this ICommandBuilderContext <SlnSolutionFileSetContext> solutionSpecifiedContext, string projectFilePath)
        {
            solutionSpecifiedContext.Add().SetProjectPath(projectFilePath);

            var finishedContext = solutionSpecifiedContext.ChangeContext <FinishedContext>();

            return(finishedContext);
        }
예제 #8
0
        public static ICommandBuilderContext <SlnContext> Sln(this ICommandBuilderContext <DotnetContext> dotnetContext)
        {
            dotnetContext.Append("sln");

            var slnContext = dotnetContext.ChangeContext <SlnContext>();

            return(slnContext);
        }
        public static ICommandBuilderContext <NewCSharpProjectContext> CSharpProject(this ICommandBuilderContext <NewContext> newContext, string projectTemplateShortName)
        {
            newContext
            .Append(projectTemplateShortName)
            .SetCSharpLanguage()
            ;

            var newCsharpProjectContext = newContext.ChangeContext <NewCSharpProjectContext>();

            return(newCsharpProjectContext);
        }
        public static ICommandBuilderContext <PublishContext> SetOutputDirectoryPath(this ICommandBuilderContext <PublishContext> publishContext, string outputDirectoryPath)
        {
            publishContext.AppendNameValuePair("--output", outputDirectoryPath);

            return(publishContext);
        }
        public static ICommandBuilderContext <PublishContext> SetFramework(this ICommandBuilderContext <PublishContext> publishContext, string frameworkName)
        {
            publishContext.AppendNameValuePair("--framework", frameworkName);

            return(publishContext);
        }
예제 #12
0
        /// <summary>
        /// Sets the "--in-root" option (no idea what that is though!).
        /// </summary>
        public static ICommandBuilderContext <SlnAddContext> SetInRoot(this ICommandBuilderContext <SlnAddContext> slnAddContext)
        {
            slnAddContext.Append("--in-root");

            return(slnAddContext);
        }
        public static ICommandBuilderContext <SlnSolutionFileSetContext> SetSolutionFile(this ICommandBuilderContext <SlnContext> slnContext, string solutionFilePath)
        {
            slnContext.AppendPath(solutionFilePath);

            var slnSolutionSpecifiedContext = slnContext.ChangeContext <SlnSolutionFileSetContext>();

            return(slnSolutionSpecifiedContext);
        }
        public static ICommandBuilderContext <NewSolutionContext> Sln(this ICommandBuilderContext <NewContext> newContext)
        {
            var solutionContext = newContext.Solution();

            return(solutionContext);
        }
        public static ICommandBuilderContext <TNewContext> SetProjectName <TNewContext>(this ICommandBuilderContext <TNewContext> newProjectContext, string projectName)
            where TNewContext : NewContext
        {
            newProjectContext.CommandBuilder.AppendNamePathValuePair("--name", projectName);

            return(newProjectContext);
        }
        public static ICommandBuilderContext <TNewContext> SetCSharpLanguage <TNewContext>(this ICommandBuilderContext <TNewContext> newProjectContext)
            where TNewContext : NewContext
        {
            newProjectContext.SetLanguage("\"C#\"");

            return(newProjectContext);
        }
예제 #17
0
        public static ICommandBuilderContext <SlnSolutionFileSetContext> Sln(this ICommandBuilderContext <DotnetContext> dotnetContext, string solutionFilePath)
        {
            var slnSpecifiedContext = dotnetContext.Sln().SetSolutionFile(solutionFilePath);

            return(slnSpecifiedContext);
        }
        public static ICommandBuilderContext <TNewContext> SetOutputDirectory <TNewContext>(this ICommandBuilderContext <TNewContext> newProjectContext, string outputDirectoryPath)
            where TNewContext : NewContext
        {
            newProjectContext.CommandBuilder.AppendNamePathValuePair("--output", outputDirectoryPath);

            return(newProjectContext);
        }
예제 #19
0
        public static ICommandBuilderContext <PublishContext> Publish(this ICommandBuilderContext <DotnetContext> dotnetContext, string projectFilePath)
        {
            var publishContext = dotnetContext.Publish().SetProjectFile(projectFilePath);

            return(publishContext);
        }
        public static ICommandBuilderContext <PublishContext> SetProjectFile(this ICommandBuilderContext <PublishContext> publishContext, string projectFilePath)
        {
            publishContext.AppendPath(projectFilePath);

            return(publishContext);
        }
예제 #21
0
        public static ICommandBuilderContext <SlnAddContext> SetProjectPath(this ICommandBuilderContext <SlnAddContext> slnAddContext, string projectFilePath)
        {
            slnAddContext.AppendPath(projectFilePath);

            return(slnAddContext);
        }
        public static ICommandBuilderContext <PublishContext> SetBuildConfigurationName(this ICommandBuilderContext <PublishContext> publishContext, string buildConfigurationName)
        {
            publishContext.AppendNameValuePair("--configuration", buildConfigurationName);

            return(publishContext);
        }
예제 #23
0
        /// <summary>
        /// Sets the "--solution-folder" option (no idea what that is though!).
        /// </summary>
        public static ICommandBuilderContext <SlnAddContext> SetSolutionFolder(this ICommandBuilderContext <SlnAddContext> slnAddContext)
        {
            slnAddContext.Append("--solution-folder");

            return(slnAddContext);
        }
예제 #24
0
        private void Execute(ICommandBuilderContext command)
        {
            var dotnetExecutableFilePath = this.DotnetExecutableFilePathProvider.GetDotnetExecutableFilePath();

            this.CommandLineInvocationOperator.Execute(dotnetExecutableFilePath, command);
        }