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


C# PrivateArguments.Add方法代码示例

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


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

示例1: AddWithPrefixedValueAdds

 public void AddWithPrefixedValueAdds()
 {
     var args = new PrivateArguments();
     args.Add("pre=", "test Value");
     Assert.AreEqual(1, args.Count);
     Assert.AreEqual("pre=test Value", args.ToString());
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:7,代码来源:PrivateArgumentsTests.cs

示例2: ExecuteCommand

        private ProcessResult ExecuteCommand(IIntegrationResult result, 
            string command, params string[] args)
        {
            var buffer = new PrivateArguments(command);
            buffer.Add(this.Source);
            foreach (var arg in args)
            {
                buffer.Add(string.Empty,
                    arg,
                    true);
            }

            var executable = string.IsNullOrEmpty(this.Executable) ?
                "GetMyCode" : this.Executable;
            var processInfo = new ProcessInfo(
                result.BaseFromWorkingDirectory(executable),
                buffer,
                result.WorkingDirectory);
            var processResult = this.Execute(processInfo);
            return processResult;
        }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:21,代码来源:GetMyCodeSourceControl.cs

示例3: GetSourceProcessInfo

		private ProcessInfo GetSourceProcessInfo(IIntegrationResult result, bool getByLabel)
		{
            var builder = new PrivateArguments();
			if (getByLabel)
			{
				builder.Add("getlabel ", _shim.Folder, true);
				builder.Add(result.Label);
				if (_shim.UseVaultWorkingDirectory)
					builder.Add("-labelworkingfolder ", result.BaseFromWorkingDirectory(_shim.WorkingDirectory), true);
				else
					builder.Add("-destpath ", result.BaseFromWorkingDirectory(_shim.WorkingDirectory), true);
			}
			else
			{
				builder.Add("get ", _shim.Folder, true);
				if (_shim.UseVaultWorkingDirectory)
					builder.Add("-performdeletions removeworkingcopy");
				else
					builder.Add("-destpath ", result.BaseFromWorkingDirectory(_shim.WorkingDirectory), true);
			}

			builder.Add("-merge ", "overwrite");
			builder.Add("-makewritable");
			builder.Add("-setfiletime ", _shim.setFileTime);
			AddCommonOptionalArguments(builder);
			return ProcessInfoFor(builder, result);
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:27,代码来源:Vault3.cs

示例4: HistoryProcessInfoArgs

 private PrivateArguments HistoryProcessInfoArgs(DateTime from, DateTime to, string tempOutputFileName)
 {
     var builder = new PrivateArguments();
     builder.Add("history ", Project, true);
     builder.Add(RecursiveCommandLineOption);
     builder.Add(string.Format("-Vd{0}~{1}", locale.FormatCommandDate(to), locale.FormatCommandDate(from)));
     AppendUsernameAndPassword(builder);
     builder.Add("-I-Y");
     builder.Add(null, "[email protected]" + tempOutputFileName, true);
     return builder;
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:11,代码来源:Vss.cs

示例5: AppendUsernameAndPassword

 private void AppendUsernameAndPassword(PrivateArguments builder)
 {
     if (!string.IsNullOrEmpty(Username))
     {
         PrivateString userPlusPass = "\"-Y" + Username + "," + Password.PrivateValue + "\"";
         builder.Add(userPlusPass);
     }
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:8,代码来源:Vss.cs

示例6: PropGetProcessInfo

 private ProcessInfo PropGetProcessInfo(IIntegrationResult result)
 {
     var buffer = new PrivateArguments("propget");
     buffer.AddIf(CheckExternalsRecursive, "-R");
     AppendCommonSwitches(buffer);
     buffer.Add("svn:externals");
     buffer.Add(TrunkUrl);
     return NewProcessInfo(buffer, result);
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:9,代码来源:Svn.cs

示例7: NewHistoryProcessInfoFromRevision

 //        HISTORY_COMMAND_FORMAT = "log url --revision {LastRevision}:HEAD --verbose --xml --non-interactive";
 private ProcessInfo NewHistoryProcessInfoFromRevision(string lastRevision, IIntegrationResult to, string url)
 {
     var buffer = new PrivateArguments("log");
     buffer.Add(null, url, true);
     buffer.Add(string.Format("-r {0}:HEAD", string.IsNullOrEmpty(lastRevision) ? "0" : lastRevision));
     buffer.Add("--verbose --xml");
     AppendCommonSwitches(buffer, url != this.TrunkUrl);
     return NewProcessInfo(buffer, to);
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:10,代码来源:Svn.cs

示例8: NewGetSourceProcessInfo

 private ProcessInfo NewGetSourceProcessInfo(IIntegrationResult result)
 {
     var buffer = new PrivateArguments("update");
     buffer.Add(null, Path.GetFullPath(result.BaseFromWorkingDirectory(WorkingDirectory)), true);
     // Do not use Modification.GetLastChangeNumber() here directly.
     AppendRevision(buffer, latestRevision);
     AppendCommonSwitches(buffer);
     if (ForceUpdate) buffer.Add("--force");
     return NewProcessInfo(buffer, result);
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:10,代码来源:Svn.cs

示例9: MapWorkSpaceProcessInfo

 // tf workfold [/map] [/s:servername] [/workspace: workspacename]
 //  repositoryfolder|localfolder
 private ProcessInfo MapWorkSpaceProcessInfo(IIntegrationResult result)
 {
     var buffer = new PrivateArguments(
         "workfold",
         "/map");
     buffer.AddQuote(ProjectPath);
     buffer.AddQuote(WorkingDirectory);
     buffer.Add("/server:", Server);
     buffer.Add("/workspace:", Workspace);
     return NewProcessInfo(buffer, result);
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:13,代码来源:Vsts.cs

示例10: DeleteWorkSpaceProcessInfo

 // tf workspaces /delete [/owner:ownername] [/computer:computername]
 // [/server:servername] workspacename
 private ProcessInfo DeleteWorkSpaceProcessInfo(IIntegrationResult result)
 {
     var buffer = new PrivateArguments(
         "workspace",
         "/delete");
     // buffer.Add("/computer:", Environment.MachineName);
     buffer.Add("-server:", Server);
     buffer.AddQuote(Workspace);
     return NewProcessInfo(buffer, result);
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:12,代码来源:Vsts.cs

示例11: CreateWorkSpaceProcessInfo

 // tf workspace /new [/noprompt] [/template:workspacename[;workspaceowner]]
 // [/computer:computername] [/comment:(“comment”|@comment file)]
 // [/s:servername] [workspacename[;workspaceowner]]
 private ProcessInfo CreateWorkSpaceProcessInfo(IIntegrationResult result)
 {
     var buffer = new PrivateArguments(
         "workspace",
         "/new");
     buffer.Add("/computer:", Environment.MachineName);
     buffer.AddQuote("/comment:", DEFAULT_WORKSPACE_COMMENT);
     buffer.Add("/server:", Server);
     buffer.AddQuote(Workspace);
     return NewProcessInfo(buffer, result);
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:14,代码来源:Vsts.cs

示例12: CheckWorkSpaceProcessInfo

 // tf workspaces [/computer:computername][/server:servername] workspacename
 private ProcessInfo CheckWorkSpaceProcessInfo(IIntegrationResult result)
 {
     var buffer = new PrivateArguments(
         "workspaces");
     buffer.Add("/computer:", Environment.MachineName);
     buffer.Add("-server:", Server);
     buffer.Add("/format:detailed");
     buffer.AddQuote(Workspace);
     return NewProcessInfo(buffer, result);
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:11,代码来源:Vsts.cs

示例13: CheckProjectProcessInfo

        // tf dir [/server:servername] itemspec [/version:versionspec]
        // [/recursive] [/folders] [/deleted]
        private ProcessInfo CheckProjectProcessInfo(IIntegrationResult result)
        {
            var buffer = new PrivateArguments(
                "dir",
                "/folders");
            buffer.Add("/server:", Server);
            buffer.AddQuote(ProjectPath);

            return NewProcessInfo(buffer, result);
        }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:12,代码来源:Vsts.cs

示例14: AddCommonOptionalArguments

        /// <summary>
        /// Adds the common optional arguments.	
        /// </summary>
        /// <param name="builder">The builder.</param>
        /// <remarks></remarks>
        protected void AddCommonOptionalArguments(PrivateArguments builder)
		{
			builder.AddIf(!string.IsNullOrEmpty(_shim.Host), "-host ", _shim.Host);
            builder.AddIf(!string.IsNullOrEmpty(_shim.Username), "-user ", _shim.Username);
            builder.AddIf(_shim.Password != null, "-password ", _shim.Password);
            builder.AddIf(!string.IsNullOrEmpty(_shim.Repository), "-repository ", _shim.Repository, true);
			builder.AddIf(_shim.Ssl, "-ssl");

			builder.AddIf(!string.IsNullOrEmpty(_shim.proxyServer), "-proxyserver ", _shim.proxyServer);
            builder.AddIf(!string.IsNullOrEmpty(_shim.proxyPort), "-proxyport ", _shim.proxyPort);
            builder.AddIf(!string.IsNullOrEmpty(_shim.proxyUser), "-proxyuser ", _shim.proxyUser);
            builder.AddIf(!string.IsNullOrEmpty(_shim.proxyPassword), "-proxypassword ", _shim.proxyPassword);
            builder.AddIf(!string.IsNullOrEmpty(_shim.proxyDomain), "-proxydomain ", _shim.proxyDomain);

			builder.Add(_shim.otherVaultArguments);
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:21,代码来源:Vault3.cs

示例15: BuildHistoryProcessArgs

		// "history ""{0}"" -excludeactions label,obliterate -rowlimit 0 -begindate {1:s} -enddate {2:s}
		// rowlimit 0 or -1 means unlimited (default is 1000 if not specified)
		// TODO: might want to make rowlimit configurable?
		private PrivateArguments BuildHistoryProcessArgs(DateTime from, DateTime to)
		{
            var builder = new PrivateArguments();
			builder.Add("history ", _shim.Folder);
			builder.Add(_shim.HistoryArgs);
			builder.Add("-begindate ", from.ToString("s", CultureInfo.CurrentCulture));
			builder.Add("-enddate ", to.ToString("s", CultureInfo.CurrentCulture));
			AddCommonOptionalArguments(builder);
            return builder;
		}
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:13,代码来源:Vault3.cs


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