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


C# PrivateArguments.ToString方法代码示例

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


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

示例1: AddQuoteWithValueAdds

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

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

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

示例4: AddIfWithValueAddsOnTrue

 public void AddIfWithValueAddsOnTrue()
 {
     var args = new PrivateArguments();
     args.AddIf(true, "testValue");
     Assert.AreEqual(1, args.Count);
     Assert.AreEqual("testValue", args.ToString());
 }
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:7,代码来源:PrivateArgumentsTests.cs

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

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

示例8: ToStringGeneratesPublicString

 public void ToStringGeneratesPublicString()
 {
     PrivateString hidden = "private";
     var args = new PrivateArguments("public", hidden);
     Assert.AreEqual("public " + hidden.PublicValue, args.ToString());
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:6,代码来源:PrivateArgumentsTests.cs

示例9: ConstructorWithTwoArgumentsInitialises

 public void ConstructorWithTwoArgumentsInitialises()
 {
     var args = new PrivateArguments("first", "second");
     Assert.AreEqual(2, args.Count);
     Assert.AreEqual("first second", args.ToString());
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:6,代码来源:PrivateArgumentsTests.cs

示例10: ConstructorWithOneArgumentInitialises

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


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