當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。