コード例 #1
0
        private string Args(IIntegrationResult result)
        {
            ProcessArgumentBuilder builder = new ProcessArgumentBuilder();

            builder.AppendArgument("-nologo");
            builder.AppendArgument("-NoProfile");
            builder.AppendArgument("-NonInteractive");
            builder.AppendArgument("-file");

            if (!string.IsNullOrEmpty(Script))
            {
                if (ConfiguredScriptsDirectory.EndsWith("\\"))
                {
                    builder.AppendArgument(@"""" + ConfiguredScriptsDirectory + Script + @"""");
                }
                else
                {
                    builder.AppendArgument(@"""" + ConfiguredScriptsDirectory + "\\" + Script + @"""");
                }
            }

            if (!string.IsNullOrEmpty(BuildArgs))
            {
                builder.AppendArgument(BuildArgs);
            }
            return(builder.ToString());
        }
コード例 #2
0
        private string Args(IIntegrationResult result)
        {
            ProcessArgumentBuilder builder = new ProcessArgumentBuilder();

            builder.AppendArgument("-nologo");
            builder.AppendArgument("-NoProfile");
            builder.AppendArgument("-NonInteractive");
            builder.AppendArgument("-file");

            if (!string.IsNullOrEmpty(Script))
            {
                if (Script.IndexOf(":") == 1) //drive letter specified, so it's not a relative path
                {
                    builder.AppendArgument(@"""" + Script + @"""");
                }
                else
                {
                    if (ConfiguredScriptsDirectory.EndsWith("\\"))
                    {
                        builder.AppendArgument(@"""" + ConfiguredScriptsDirectory + Script + @"""");
                    }
                    else
                    {
                        builder.AppendArgument(@"""" + ConfiguredScriptsDirectory + "\\" + Script + @"""");
                    }
                }
            }


            if (!string.IsNullOrEmpty(BuildArgs))
            {
                builder.AppendArgument(BuildArgs);
            }
            return(builder.ToString());
        }