// Copyright Epic Games, Inc. All Rights Reserved. using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using EpicGames.Core; namespace HordeAgent { /// /// Base class for all commands that can be executed by HordeAgent /// abstract class Command { /// /// Configure this object with the given command line arguments /// /// Command line arguments /// Logging output device public virtual void Configure(CommandLineArguments Arguments, ILogger Logger) { Arguments.ApplyTo(this, Logger); } /// /// Gets all command line parameters to show in help for this command /// /// The command line arguments /// List of name/description pairs public virtual List> GetParameters(CommandLineArguments Arguments) { return CommandLineArguments.GetParameters(GetType()); } /// /// Execute this command /// /// The logger to use for this command /// Exit code public abstract Task ExecuteAsync(ILogger Logger); } }