コード例 #1
0
        public static ICommandBuilderContext <TNewContext> SetName <TNewContext>(this ICommandBuilderContext <TNewContext> newSlnContext, string solutionName)
            where TNewContext : NewContext
        {
            newSlnContext.CommandBuilder.AppendNameValuePair("--name", solutionName);

            return(newSlnContext);
        }
コード例 #2
0
        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);
        }
コード例 #6
0
        /// <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);
        }
コード例 #9
0
        public static ICommandBuilderContext <NewCSharpProjectContext> CSharpProject(this ICommandBuilderContext <NewContext> newContext, string projectTemplateShortName)
        {
            newContext
            .Append(projectTemplateShortName)
            .SetCSharpLanguage()
            ;

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

            return(newCsharpProjectContext);
        }
コード例 #10
0
        public static ICommandBuilderContext <PublishContext> SetOutputDirectoryPath(this ICommandBuilderContext <PublishContext> publishContext, string outputDirectoryPath)
        {
            publishContext.AppendNameValuePair("--output", outputDirectoryPath);

            return(publishContext);
        }
コード例 #11
0
        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);
        }
コード例 #13
0
        public static ICommandBuilderContext <SlnSolutionFileSetContext> SetSolutionFile(this ICommandBuilderContext <SlnContext> slnContext, string solutionFilePath)
        {
            slnContext.AppendPath(solutionFilePath);

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

            return(slnSolutionSpecifiedContext);
        }
コード例 #14
0
        public static ICommandBuilderContext <NewSolutionContext> Sln(this ICommandBuilderContext <NewContext> newContext)
        {
            var solutionContext = newContext.Solution();

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

            return(newProjectContext);
        }
コード例 #16
0
        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);
        }
コード例 #18
0
        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);
        }
コード例 #20
0
        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);
        }
コード例 #22
0
        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);
        }