本文整理汇总了C#中Protobuild.Execution.SetCommandToExecuteIfNotDefault方法的典型用法代码示例。如果您正苦于以下问题:C# Execution.SetCommandToExecuteIfNotDefault方法的具体用法?C# Execution.SetCommandToExecuteIfNotDefault怎么用?C# Execution.SetCommandToExecuteIfNotDefault使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Protobuild.Execution
的用法示例。
在下文中一共展示了Execution.SetCommandToExecuteIfNotDefault方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Encounter
public void Encounter(Execution pendingExecution, string[] args)
{
pendingExecution.SetCommandToExecuteIfNotDefault(this);
if (args.Length < 5 || args[0] == null || args[1] == null || args[2] == null || args[3] == null || args[4] == null)
{
throw new InvalidOperationException("You must provide all arguments to -push except for the branch name.");
}
if (File.Exists(args[0]))
{
using (var reader = new StreamReader(args[0]))
{
pendingExecution.PackagePushApiKey = reader.ReadToEnd().Trim();
}
}
else
{
pendingExecution.PackagePushApiKey = args[0];
}
pendingExecution.PackagePushFile = new FileInfo(args[1]).FullName;
pendingExecution.PackagePushUrl = args[2].TrimEnd('/');
pendingExecution.PackagePushVersion = args[3];
pendingExecution.PackagePushPlatform = args[4];
pendingExecution.PackagePushBranchToUpdate = args.Length >= 6 ? args[5] : null;
}
示例2: Encounter
public void Encounter(Execution pendingExecution, string[] args)
{
pendingExecution.SetCommandToExecuteIfNotDefault(this);
if (args.Length > 0)
{
pendingExecution.AutomatedBuildScriptPath = args[0];
}
}
示例3: Encounter
public void Encounter(Execution pendingExecution, string[] args)
{
pendingExecution.SetCommandToExecuteIfNotDefault(this);
if (args.Length > 0)
{
pendingExecution.Platform = args[0];
}
}
示例4: Encounter
public void Encounter(Execution pendingExecution, string[] args)
{
pendingExecution.SetCommandToExecuteIfNotDefault(this);
if (args.Length == 0 || args[0] == null)
{
throw new InvalidOperationException("You must provide an argument to the -install option");
}
pendingExecution.PackageUrl = args[0];
}
示例5: Encounter
public void Encounter(Execution pendingExecution, string[] args)
{
pendingExecution.SetCommandToExecuteIfNotDefault(this);
if (args.Length < 1 || args[0] == null)
{
throw new InvalidOperationException("You must provide the URL of the package to swap to binary.");
}
pendingExecution.PackageUrl = args[0];
}
示例6: Encounter
public void Encounter(Execution pendingExecution, string[] args)
{
pendingExecution.SetCommandToExecuteIfNotDefault(this);
if (args.Length < 1 || args[0] == null)
{
throw new InvalidOperationException("You must provide the template's URL.");
}
pendingExecution.StartProjectTemplateURL = args[0];
pendingExecution.StartProjectName = args.Length >= 2 ? args[1] : null;
}
示例7: Encounter
public void Encounter(Execution pendingExecution, string[] args)
{
pendingExecution.SetCommandToExecuteIfNotDefault(this);
if (args.Length < 3 || args[0] == null || args[1] == null || args[2] == null)
{
throw new InvalidOperationException("You must provide the module folder, destination file and platform to -pack.");
}
pendingExecution.PackageSourceFolder = new DirectoryInfo(args[0]).FullName;
pendingExecution.PackageDestinationFile = new FileInfo(args[1]).FullName;
pendingExecution.PackagePlatform = args.Length >= 3 ? args[2] : this.m_HostPlatformDetector.DetectPlatform();
pendingExecution.PackageFilterFile = args.Length >= 4 ? args[3] : null;
}
示例8: Encounter
public void Encounter(Execution pendingExecution, string[] args)
{
pendingExecution.SetCommandToExecuteIfNotDefault(this);
pendingExecution.ExecuteProjectName = args[0];
var newArgs = new string[args.Length - 1];
for (var i = 1; i < args.Length; i++)
{
newArgs[i - 1] = args[i];
}
pendingExecution.ExecuteProjectArguments = newArgs;
}
示例9: Encounter
public void Encounter(Execution pendingExecution, string[] args)
{
pendingExecution.SetCommandToExecuteIfNotDefault(this);
}