本文整理汇总了C#中ThoughtWorks.CruiseControl.Core.Util.PrivateArguments类的典型用法代码示例。如果您正苦于以下问题:C# PrivateArguments类的具体用法?C# PrivateArguments怎么用?C# PrivateArguments使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PrivateArguments类属于ThoughtWorks.CruiseControl.Core.Util命名空间,在下文中一共展示了PrivateArguments类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: NewHistoryProcessInfo
// HISTORY_COMMAND_FORMAT = "log url --revision \"{{{StartDate}}}:{{{EndDate}}}\" --verbose --xml --non-interactive";
private ProcessInfo NewHistoryProcessInfo(IIntegrationResult from, IIntegrationResult to, string url)
{
var buffer = new PrivateArguments("log");
buffer.Add(null, url, true);
buffer.Add(string.Format("-r \"{{{0}}}:{{{1}}}\"", FormatCommandDate(from.StartTime), FormatCommandDate(to.StartTime)));
buffer.Add("--verbose --xml");
AppendCommonSwitches(buffer, url != this.TrunkUrl);
return NewProcessInfo(buffer, to);
}
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:10,代码来源:Svn.cs
示例17: 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
示例18: RevertWorkingCopy
private ProcessInfo RevertWorkingCopy(IIntegrationResult result)
{
var buffer = new PrivateArguments("revert", "--recursive");
buffer.Add(null, Path.GetFullPath(result.BaseFromWorkingDirectory(WorkingDirectory)), true);
return NewProcessInfo(buffer, result);
}
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:7,代码来源:Svn.cs
示例19: 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
示例20: NewProcessInfo
private ProcessInfo NewProcessInfo(PrivateArguments args, IIntegrationResult result)
{
string workingDirectory = Path.GetFullPath(result.BaseFromWorkingDirectory(WorkingDirectory));
if (!Directory.Exists(workingDirectory)) Directory.CreateDirectory(workingDirectory);
ProcessInfo processInfo = new ProcessInfo(Executable, args, workingDirectory);
processInfo.StreamEncoding = Encoding.UTF8;
return processInfo;
}
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:9,代码来源:Svn.cs
注:本文中的ThoughtWorks.CruiseControl.Core.Util.PrivateArguments类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论