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


C# Execution.SetCommandToExecuteIfNotDefault方法代码示例

本文整理汇总了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;
        }
开发者ID:marler8997,项目名称:Protobuild,代码行数:27,代码来源:PushPackageCommand.cs

示例2: Encounter

        public void Encounter(Execution pendingExecution, string[] args)
        {
            pendingExecution.SetCommandToExecuteIfNotDefault(this);

            if (args.Length > 0)
            {
                pendingExecution.AutomatedBuildScriptPath = args[0];
            }
        }
开发者ID:marler8997,项目名称:Protobuild,代码行数:9,代码来源:AutomatedBuildCommand.cs

示例3: Encounter

        public void Encounter(Execution pendingExecution, string[] args)
        {
            pendingExecution.SetCommandToExecuteIfNotDefault(this);

            if (args.Length > 0)
            {
                pendingExecution.Platform = args[0];
            }
        }
开发者ID:marler8997,项目名称:Protobuild,代码行数:9,代码来源:BuildCommand.cs

示例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];
        }
开发者ID:jbeshir,项目名称:Protobuild,代码行数:11,代码来源:InstallPackageCommand.cs

示例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];
        }
开发者ID:jbeshir,项目名称:Protobuild,代码行数:11,代码来源:SwapToBinaryCommand.cs

示例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;
        }
开发者ID:jbeshir,项目名称:Protobuild,代码行数:12,代码来源:StartCommand.cs

示例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;
        }
开发者ID:Eversor,项目名称:Protobuild,代码行数:14,代码来源:PackPackageCommand.cs

示例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;
        }
开发者ID:marler8997,项目名称:Protobuild,代码行数:14,代码来源:ExecuteCommand.cs

示例9: Encounter

 public void Encounter(Execution pendingExecution, string[] args)
 {
     pendingExecution.SetCommandToExecuteIfNotDefault(this);
 }
开发者ID:jbeshir,项目名称:Protobuild,代码行数:4,代码来源:ListPackagesCommand.cs


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