本文整理汇总了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());
}
示例2: AddWithValueAdds
public void AddWithValueAdds()
{
var args = new PrivateArguments();
args.Add("testValue");
Assert.AreEqual(1, args.Count);
Assert.AreEqual("testValue", args.ToString());
}
示例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());
}
示例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());
}
示例5: AddIfWithValueDoesNotAddOnFalse
public void AddIfWithValueDoesNotAddOnFalse()
{
var args = new PrivateArguments();
args.AddIf(false, "testValue");
Assert.AreEqual(0, args.Count);
Assert.AreEqual(string.Empty, 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: 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;
}
示例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);
}
示例9: ConstructorWithNoArgumentsInitialises
public void ConstructorWithNoArgumentsInitialises()
{
var args = new PrivateArguments();
Assert.AreEqual(0, args.Count);
}
示例10: ToStringPrivateGeneratesPublicString
public void ToStringPrivateGeneratesPublicString()
{
PrivateString hidden = "private";
var args = new PrivateArguments("public", hidden);
Assert.AreEqual("public private", args.ToString(SecureDataMode.Private));
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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){}