本文整理汇总了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());
}
示例2: AddIfWithValueDoesNotAddOnFalse
public void AddIfWithValueDoesNotAddOnFalse()
{
var args = new PrivateArguments();
args.AddIf(false, "testValue");
Assert.AreEqual(0, args.Count);
Assert.AreEqual(string.Empty, args.ToString());
}
示例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());
}
示例4: AddIfWithValueAddsOnTrue
public void AddIfWithValueAddsOnTrue()
{
var args = new PrivateArguments();
args.AddIf(true, "testValue");
Assert.AreEqual(1, args.Count);
Assert.AreEqual("testValue", args.ToString());
}
示例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());
}
示例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 };
}
示例7: ToStringPrivateGeneratesPublicString
public void ToStringPrivateGeneratesPublicString()
{
PrivateString hidden = "private";
var args = new PrivateArguments("public", hidden);
Assert.AreEqual("public private", args.ToString(SecureDataMode.Private));
}
示例8: ToStringGeneratesPublicString
public void ToStringGeneratesPublicString()
{
PrivateString hidden = "private";
var args = new PrivateArguments("public", hidden);
Assert.AreEqual("public " + hidden.PublicValue, args.ToString());
}
示例9: ConstructorWithTwoArgumentsInitialises
public void ConstructorWithTwoArgumentsInitialises()
{
var args = new PrivateArguments("first", "second");
Assert.AreEqual(2, args.Count);
Assert.AreEqual("first second", args.ToString());
}
示例10: ConstructorWithOneArgumentInitialises
public void ConstructorWithOneArgumentInitialises()
{
var args = new PrivateArguments("test");
Assert.AreEqual(1, args.Count);
Assert.AreEqual("test", args.ToString());
}