當前位置: 首頁>>代碼示例>>C#>>正文


C# Util.PrivateArguments類代碼示例

本文整理匯總了C#中ThoughtWorks.CruiseControl.Core.Util.PrivateArguments的典型用法代碼示例。如果您正苦於以下問題:C# PrivateArguments類的具體用法?C# PrivateArguments怎麽用?C# PrivateArguments使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PrivateArguments類屬於ThoughtWorks.CruiseControl.Core.Util命名空間,在下文中一共展示了PrivateArguments類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AddIfWithPrefixedValueAddsOnTrue

 public void AddIfWithPrefixedValueAddsOnTrue()
 {
     var args = new PrivateArguments();
     args.AddIf(true, "pre=", "test Value");
     Assert.AreEqual(1, args.Count);
     Assert.AreEqual("pre=test Value", args.ToString());
 }
開發者ID:derrills1,項目名稱:ccnet_gitmode,代碼行數:7,代碼來源:PrivateArgumentsTests.cs

示例2: AddWithValueAdds

 public void AddWithValueAdds()
 {
     var args = new PrivateArguments();
     args.Add("testValue");
     Assert.AreEqual(1, args.Count);
     Assert.AreEqual("testValue", args.ToString());
 }
開發者ID:kascomp,項目名稱:CruiseControl.NET,代碼行數:7,代碼來源:PrivateArgumentsTests.cs

示例3: AddQuoteWithPrefixedValueAdds

 public void AddQuoteWithPrefixedValueAdds()
 {
     var args = new PrivateArguments();
     args.AddQuote("pre=", "test Value");
     Assert.AreEqual(1, args.Count);
     Assert.AreEqual("pre=\"test Value\"", args.ToString());
 }
開發者ID:kascomp,項目名稱:CruiseControl.NET,代碼行數:7,代碼來源:PrivateArgumentsTests.cs

示例4: AddIfWithAutoQuoteValueAddsOnTrue

 public void AddIfWithAutoQuoteValueAddsOnTrue()
 {
     var args = new PrivateArguments();
     args.AddIf(true, "pre=", "test Value", true);
     Assert.AreEqual(1, args.Count);
     Assert.AreEqual("pre=\"test Value\"", args.ToString());
 }
開發者ID:derrills1,項目名稱:ccnet_gitmode,代碼行數:7,代碼來源:PrivateArgumentsTests.cs

示例5: AddIfWithValueDoesNotAddOnFalse

 public void AddIfWithValueDoesNotAddOnFalse()
 {
     var args = new PrivateArguments();
     args.AddIf(false, "testValue");
     Assert.AreEqual(0, args.Count);
     Assert.AreEqual(string.Empty, args.ToString());
 }
開發者ID:derrills1,項目名稱:ccnet_gitmode,代碼行數:7,代碼來源:PrivateArgumentsTests.cs

示例6: ProcessInfo

 public ProcessInfo(string filename, PrivateArguments arguments, string workingDirectory, ProcessPriorityClass priority, int[] successExitCodes)
 {
     this.arguments = arguments;
     this.Priority = priority;
     startInfo.FileName = StringUtil.StripQuotes(filename);
     startInfo.Arguments = arguments == null ? null : arguments.ToString(SecureDataMode.Private);
     startInfo.WorkingDirectory = StringUtil.StripQuotes(workingDirectory);
     startInfo.UseShellExecute = false;
     startInfo.CreateNoWindow = true;
     startInfo.RedirectStandardOutput = true;
     startInfo.RedirectStandardError = true;
     startInfo.RedirectStandardInput = false;
     RepathExecutableIfItIsInWorkingDirectory();
     this.successExitCodes = successExitCodes ?? new int[] { 0 };
 }
開發者ID:derrills1,項目名稱:ccnet_gitmode,代碼行數:15,代碼來源:ProcessInfo.cs

示例7: 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

示例8: CleanupWorkingCopy

        private ProcessInfo CleanupWorkingCopy(IIntegrationResult result)
        {
            var buffer = new PrivateArguments("cleanup");
            buffer.Add(null, Path.GetFullPath(result.BaseFromWorkingDirectory(WorkingDirectory)), true);

            return NewProcessInfo(buffer, result);
        }
開發者ID:derrills1,項目名稱:ccnet_gitmode,代碼行數:7,代碼來源:Svn.cs

示例9: ConstructorWithNoArgumentsInitialises

 public void ConstructorWithNoArgumentsInitialises()
 {
     var args = new PrivateArguments();
     Assert.AreEqual(0, args.Count);
 }
開發者ID:kascomp,項目名稱:CruiseControl.NET,代碼行數:5,代碼來源:PrivateArgumentsTests.cs

示例10: ToStringPrivateGeneratesPublicString

 public void ToStringPrivateGeneratesPublicString()
 {
     PrivateString hidden = "private";
     var args = new PrivateArguments("public", hidden);
     Assert.AreEqual("public private", args.ToString(SecureDataMode.Private));
 }
開發者ID:kascomp,項目名稱:CruiseControl.NET,代碼行數:6,代碼來源:PrivateArgumentsTests.cs

示例11: ListObstructions

        /// <summary>
        /// Lists any obstructed files or folders.
        /// </summary>
        /// <param name="result">The current result.</param>
        private IList<string> ListObstructions(IIntegrationResult result)
        {
            var args = new PrivateArguments("status", "--xml");
            var info = this.NewProcessInfo(args, result);
            var processResult = Execute(info);

            var obstructions = new List<string>();
            var svnData = new XmlDocument();
            svnData.LoadXml(processResult.StandardOutput);
            var nodes = svnData.SelectNodes("//entry[wc-status/@item=\"obstructed\"]");
            foreach (XmlElement node in nodes)
            {
                obstructions.Add(node.GetAttribute("path"));
            }

            return obstructions;
        }
開發者ID:derrills1,項目名稱:ccnet_gitmode,代碼行數:21,代碼來源:Svn.cs

示例12: GetSourceArgs

 private PrivateArguments GetSourceArgs(IIntegrationResult result)
 {
     var builder = new PrivateArguments();
     builder.Add("get ", Project + "/*?*", true);
     builder.Add(RecursiveCommandLineOption);
     builder.AddIf(ApplyLabel, "-VL", tempLabel);
     builder.AddIf(!AlwaysGetLatest, "-Vd", locale.FormatCommandDate(result.StartTime));
     AppendUsernameAndPassword(builder);
     builder.Add("-I-N -W -GF- -GTM");
     builder.AddIf(CleanCopy, "-GWR");
     return builder;
 }
開發者ID:derrills1,項目名稱:ccnet_gitmode,代碼行數:12,代碼來源:Vss.cs

示例13: NewLabelProcessInfo

 //        TAG_COMMAND_FORMAT = "copy --message "CCNET build label" "trunkUrl" "tagBaseUrl/label"
 private ProcessInfo NewLabelProcessInfo(IIntegrationResult result)
 {
     var buffer = new PrivateArguments("copy");
     buffer.Add(null, TagMessage(result.Label), true);
     buffer.Add(null, TagSource(result), true);
     buffer.Add(null, TagDestination(result.Label), true);
     // Do not use Modification.GetLastChangeNumber() here directly.
     AppendRevision(buffer, latestRevision);
     AppendCommonSwitches(buffer);
     return NewProcessInfo(buffer, result);
 }
開發者ID:derrills1,項目名稱:ccnet_gitmode,代碼行數:12,代碼來源:Svn.cs

示例14: LabelProcessInfoArgs

 private PrivateArguments LabelProcessInfoArgs(string label, string oldLabel)
 {
     var builder = new PrivateArguments();
     builder.Add("label ", Project, true);
     builder.Add("-L", label);
     builder.AddIf(!string.IsNullOrEmpty(oldLabel), "-VL", oldLabel);
     AppendUsernameAndPassword(builder);
     builder.Add("-I-Y");
     return builder;
 }
開發者ID:derrills1,項目名稱:ccnet_gitmode,代碼行數:10,代碼來源:Vss.cs

示例15: ProcessInfo

 /// <summary>
 /// Initializes a new instance of the <see cref="ProcessInfo" /> class.	
 /// </summary>
 /// <param name="filename">The filename.</param>
 /// <param name="arguments">The arguments.</param>
 /// <param name="workingDirectory">The working directory.</param>
 /// <param name="priority">The priority.</param>
 /// <remarks></remarks>
 public ProcessInfo(string filename, PrivateArguments arguments, string workingDirectory, ProcessPriorityClass priority) :
     this(filename, arguments, workingDirectory, priority, null){}
開發者ID:kascomp,項目名稱:CruiseControl.NET,代碼行數:10,代碼來源:ProcessInfo.cs


注:本文中的ThoughtWorks.CruiseControl.Core.Util.PrivateArguments類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。