// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved. using System; using System.Collections.Generic; using System.Linq; using System.Text; using AutomationTool; /// /// Base class for buildcommands. /// public abstract class BuildCommand : CommandUtils { #region Interface /// /// Build command entry point. Throws AutomationExceptions on failure. /// public abstract void ExecuteBuild(); #endregion /// /// Command entry point. /// public void Execute() { try { ExecuteBuild(); } catch { LogError("BUILD FAILED"); throw; } Log("BUILD SUCCESSFUL"); } /// /// Executes a new command as a child of another command. /// /// /// public static void Execute(BuildCommand ParentCommand) where T : BuildCommand, new() { T Command = new T(); if (ParentCommand != null) { Command.Params = ParentCommand.Params; } Command.Execute(); } }