当前位置: 首页>>代码示例>>C#>>正文


C# ProcessArgumentBuilder.AddArgument方法代码示例

本文整理汇总了C#中ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder.AddArgument方法的典型用法代码示例。如果您正苦于以下问题:C# ProcessArgumentBuilder.AddArgument方法的具体用法?C# ProcessArgumentBuilder.AddArgument怎么用?C# ProcessArgumentBuilder.AddArgument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder的用法示例。


在下文中一共展示了ProcessArgumentBuilder.AddArgument方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RunSvnProcess

        public static ProcessResult RunSvnProcess(SvnOptions svnLoginOptions, ProcessArgumentBuilder argBuilder)
        {
            argBuilder.AddArgument("--non-interactive");
            argBuilder.AddArgument("--no-auth-cache");

            ProcessInfo info = new ProcessInfo("svn.exe", argBuilder.ToString());

            ProcessExecutor executor = new ProcessExecutor();
            ProcessResult result = executor.Execute(info);
            return result;
        }
开发者ID:nfrey,项目名称:qreal,代码行数:11,代码来源:SvnProcessHelper.cs

示例2: ToString

        public override string ToString()
        {
            ProcessArgumentBuilder argsBuilder = new ProcessArgumentBuilder();
            argsBuilder.AddArgument("/xml", "=", outputfile);
            argsBuilder.AddArgument("/nologo");

            foreach (string assemblyName in assemblies)
            {
                argsBuilder.AddArgument(assemblyName);
            }
            return argsBuilder.ToString();
        }
开发者ID:vardars,项目名称:ci-factory,代码行数:12,代码来源:NUnitArgument.cs

示例3: AppendCategoriesArg

 /// <summary>
 /// Appends the categories, with value not an empty string nor a whitespace,
 /// to the excluded or included categories lists.
 /// </summary>
 /// <param name="argsBuilder">The args builder.</param>
 private void AppendCategoriesArg(ProcessArgumentBuilder argsBuilder)
 {
     if (ExcludedCategories != null && ExcludedCategories.Length != 0)
     {
         string[] excludedCategories = System.Array.FindAll(ExcludedCategories, IsNotWhitespace);
         argsBuilder.AddArgument("/exclude", "=", string.Join(",", excludedCategories));
     }
     if (IncludedCategories != null && IncludedCategories.Length != 0)
     {
         string[] includedCategories = System.Array.FindAll(IncludedCategories, IsNotWhitespace);
         argsBuilder.AddArgument("/include", "=", string.Join(",", includedCategories));
     }
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:18,代码来源:NUnitArgument.cs

示例4: Args

        private string Args(IIntegrationResult result)
        {
            ProcessArgumentBuilder builder = new ProcessArgumentBuilder();

            builder.AddArgument("/nologo");
            if (! StringUtil.IsBlank(Targets)) builder.AddArgument("/t:" + Targets);
            builder.AddArgument(GetPropertyArgs(result));
            builder.AppendArgument(BuildArgs);
            builder.AddArgument(ProjectFile);
            builder.AddArgument(GetLoggerArgs(result));

            return builder.ToString();
        }
开发者ID:vardars,项目名称:ci-factory,代码行数:13,代码来源:MsBuildTask.cs

示例5: GetSvnRevision

        public static int GetSvnRevision(SvnOptions svnOptions)
        {
            ProcessArgumentBuilder argBuilder = new ProcessArgumentBuilder();
            argBuilder.AppendArgument("log");
            argBuilder.AppendArgument("--xml");
            argBuilder.AppendArgument("--limit 1");
            argBuilder.AddArgument(StringHelper.Quote(svnOptions.Url));
            ProcessResult result = RunSvnProcess(svnOptions, argBuilder);

            XmlDocument xml = new XmlDocument();
            xml.LoadXml(result.StandardOutput);

            XmlNode node = xml.SelectSingleNode("/log/logentry/@revision");
            return Convert.ToInt32(node.InnerText);
        }
开发者ID:nfrey,项目名称:qreal,代码行数:15,代码来源:SvnProcessHelper.cs

示例6: BuildMemberInfoCommandXml

 //MEMBER_INFO_TEMPLATE = "memberinfo -S {SandboxRoot\SandboxFile} --user={user} --password={password} {member}"
 private string BuildMemberInfoCommandXml(Modification modification)
 {
     ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
     buffer.AppendArgument("memberinfo --xmlapi");
     AppendCommonArguments(buffer, false, true);
     string modificationPath = (modification.FolderName == null) ? SandboxRoot : Path.Combine(SandboxRoot, modification.FolderName);
     buffer.AddArgument(Path.Combine(modificationPath, modification.FileName));
     return buffer.ToString();
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:10,代码来源:Mks.cs

示例7: GitUpdateSubmodules

        /// <summary>
        /// Updates and fetches git submodules.
        /// </summary>
        /// <param name="result"></param>
        private void GitUpdateSubmodules(IIntegrationResult result)
        {
            ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
            buffer.AddArgument("submodule");
            buffer.AddArgument("update");

            // initialize progress information
            var bpi = GetBuildProgressInformation(result);
            bpi.SignalStartRunTask(string.Concat("git ", buffer.ToString()));

            // enable Stdout monitoring
            ProcessExecutor.ProcessOutput += ProcessExecutor_ProcessOutput;

            Execute(NewProcessInfo(buffer.ToString(), result));

            // remove Stdout monitoring
            ProcessExecutor.ProcessOutput -= ProcessExecutor_ProcessOutput;
        }
开发者ID:josemarcenaro,项目名称:CruiseControl.NET,代码行数:22,代码来源:Git.cs

示例8: GitPushTag

		/// <summary>
		/// Push a specific tag with "git push origin tag 'tag name'".
		/// </summary>
		/// <param name="tagName">Naem of the tag to push.</param>
		/// <param name="result">IIntegrationResult of the current build.</param>
		private void GitPushTag(string tagName, IIntegrationResult result)
		{
			ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
			buffer.AddArgument("push");
			buffer.AddArgument("origin");
			buffer.AddArgument("tag");
			buffer.AddArgument(tagName);

			// initialize progress information
			var bpi = GetBuildProgressInformation(result);
			bpi.SignalStartRunTask(string.Concat("git ", buffer.ToString()));

			// enable Stdout monitoring
			ProcessExecutor.ProcessOutput += ProcessExecutor_ProcessOutput;

			Execute(NewProcessInfo(buffer.ToString(), result));

			// remove Stdout monitoring
			ProcessExecutor.ProcessOutput -= ProcessExecutor_ProcessOutput;
		}
开发者ID:josemarcenaro,项目名称:CruiseControl.NET,代码行数:25,代码来源:Git.cs

示例9: GitAddAll

		/// <summary>
		/// Add all modified and all untracked files that are not ignored by .gitignore
		/// to the git index with the "git add --all" command.
		/// </summary>
		/// <param name="result">IIntegrationResult of the current build.</param>
		private void GitAddAll(IIntegrationResult result)
		{
			ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
			buffer.AddArgument("add");
			buffer.AddArgument("--all");
			Execute(NewProcessInfo(buffer.ToString(), result));
		}
开发者ID:josemarcenaro,项目名称:CruiseControl.NET,代码行数:12,代码来源:Git.cs

示例10: GitClean

		/// <summary>
		/// Clean the working tree with "git clean -d -f -x".
		/// </summary>
		/// <param name="result">IIntegrationResult of the current build.</param>
		private void GitClean(IIntegrationResult result)
		{
			ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
			buffer.AddArgument("clean");
			buffer.AddArgument("-d");
			buffer.AddArgument("-f");
			buffer.AddArgument("-x");
			Execute(NewProcessInfo(buffer.ToString(), result));
		}
开发者ID:josemarcenaro,项目名称:CruiseControl.NET,代码行数:13,代码来源:Git.cs

示例11: GitConfigGet

		/// <summary>
		/// Call "git config --get 'name'" to get the value of a local repository property.
        /// The command returns error code 1 if the key was not found and error code 2 if multiple key values were found. 
		/// </summary>
		/// <param name="name">Name of the config parameter.</param>
		/// <param name="result">IIntegrationResult of the current build.</param>
		/// <returns>Result of the "git config --get 'name'" command.</returns>
        private string GitConfigGet(string name, IIntegrationResult result)
		{
		    ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
		    buffer.AddArgument("config");
		    buffer.AddArgument("--get");
		    buffer.AddArgument(name);
		    return
		        Execute(NewProcessInfo(buffer.ToString(), result, ProcessPriorityClass.Normal, new int[] {0, 1, 2})).
		            StandardOutput.Trim();
		}
开发者ID:josemarcenaro,项目名称:CruiseControl.NET,代码行数:17,代码来源:Git.cs

示例12: NewCheckoutProcessInfo

        private ProcessInfo NewCheckoutProcessInfo(IIntegrationResult result)
        {
            // CCNET-1796: work around a CVS limitation: the -d parameter only accepts limited relative paths
            // so the working directory is one level up of the checkout dir and
            // override checkout directory
            var wd = result.BaseFromWorkingDirectory(WorkingDirectory);
            var lastDirectorySeparatorIndex = wd.TrimEnd().TrimEnd(Path.DirectorySeparatorChar).LastIndexOf(Path.DirectorySeparatorChar);
            var checkoutWd = wd.Substring(0, lastDirectorySeparatorIndex);
            var checkoutDir = wd.Substring(lastDirectorySeparatorIndex).Trim(Path.DirectorySeparatorChar);
            Log.Debug("[CVS] Configured Working Directory: '{0}'", wd);
            Log.Debug("[CVS] Checkout Working Directory: '{0}'", checkoutWd);
            Log.Debug("[CVS] Checkout Directory: '{0}'", checkoutDir);

            ProcessArgumentBuilder builder = new ProcessArgumentBuilder();
            AppendCvsRoot(builder);
            builder.AddArgument("-q");
            builder.AddArgument("checkout");
            builder.AddArgument("-R");
            builder.AddArgument("-P");
            builder.AddArgument("-r", Branch);
            builder.AddArgument("-d", StringUtil.AutoDoubleQuoteString(checkoutDir));
            builder.AddArgument(Module);
            var pi = NewProcessInfoWithArgs(result, builder.ToString());
            pi.WorkingDirectory = checkoutWd;
            return pi;
        }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:26,代码来源:Cvs.cs

示例13: BuildLogProcessInfoArgs

 // cvs [-d :ext:mycvsserver:/cvsroot/myrepo] -q log -N "-d>2004-12-24 12:00:00 GMT" -rmy_branch (with branch)
 // cvs [-d :ext:mycvsserver:/cvsroot/myrepo] -q log -Nb "-d>2004-12-24 12:00:00 GMT" (without branch)
 //        public const string HISTORY_COMMAND_FORMAT = @"{0}-q log -N{3} ""-d>{1}""{2}";		// -N means 'do not show tags'
 private string BuildLogProcessInfoArgs(DateTime from)
 {
     ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
     AppendCvsRoot(buffer);
     buffer.AddArgument("-q"); // quiet
     buffer.AddArgument("rlog");
     buffer.AddArgument("-N"); // do not show tags
     buffer.AppendIf(SuppressRevisionHeader, "-S");
     if (string.IsNullOrEmpty(Branch))
     {
         buffer.AddArgument("-b"); // only list revisions on HEAD
     }
     else
     {
         buffer.AppendArgument("-r{0}", Branch); // list revisions on branch
     }
     buffer.AppendArgument(@"""-d>{0}""", FormatCommandDate(from));
     if (!string.IsNullOrEmpty(RestrictLogins))
     {
         foreach (string login in RestrictLogins.Split(','))
         {
             buffer.AppendArgument("-w{0}", login.Trim());
         }
     }
     buffer.AddArgument(Module);
     return buffer.ToString();
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:30,代码来源:Cvs.cs

示例14: AppendCvsRoot

 private void AppendCvsRoot(ProcessArgumentBuilder buffer)
 {
     buffer.AddArgument("-d", CvsRoot);
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:4,代码来源:Cvs.cs

示例15: GitLogOriginHashDateTime

 /// <summary>
 /// Get the date and iime of the latest commit in the remote repository
 /// </summary>
 /// <param name="branchName">Name of the branch.</param>
 /// <param name="result">IIntegrationResult of the current build.</param>
 private string GitLogOriginHashDateTime(string branchName, IIntegrationResult result)
 {
     ProcessArgumentBuilder buffer = new ProcessArgumentBuilder();
     buffer.AddArgument("log");
     buffer.AddArgument(string.Concat("origin/", branchName));
     buffer.AddArgument("--date-order");
     buffer.AddArgument("-1");
     buffer.AddArgument("--pretty=format:\"%ci\"");
     return Execute(NewProcessInfo(buffer.ToString(), result)).StandardOutput;
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:15,代码来源:Git.cs


注:本文中的ThoughtWorks.CruiseControl.Core.Util.ProcessArgumentBuilder.AddArgument方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。