| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | |
| 3 | namespace WixToolset.Extensibility |
| 4 | { |
| 5 | using System.Threading; |
| 6 | using System.Threading.Tasks; |
| 7 | using WixToolset.Extensibility.Data; |
| 8 | using WixToolset.Extensibility.Services; |
| 9 | |
| 10 | /// <summary> |
| 11 | /// Base class for a command-line command. |
| 12 | /// </summary> |
| 13 | public abstract class BaseCommandLineCommand : ICommandLineCommand |
| 14 | { |
| 15 | /// <summary> |
| 16 | /// See <see cref="ICommandLineCommand.ShowLogo" /> |
| 17 | /// </summary> |
| 18 | public virtual bool ShowLogo => false; |
| 19 | |
| 20 | /// <summary> |
| 21 | /// See <see cref="ICommandLineCommand.StopParsing" /> |
| 22 | /// </summary> |
| 23 | public bool StopParsing { get; protected set; } |
| 24 | |
| 25 | /// <summary> |
| 26 | /// See <see cref="ICommandLineCommand.ExecuteAsync" /> |
| 27 | /// </summary> |
| 28 | public abstract Task<int> ExecuteAsync(CancellationToken cancellationToken); |
| 29 | |
| 30 | /// <summary> |
| 31 | /// See <see cref="ICommandLineCommand.GetCommandLineHelp" /> |
| 32 | /// </summary> |
| 33 | public abstract CommandLineHelp GetCommandLineHelp(); |
| 34 | |
| 35 | /// <summary> |
| 36 | /// See <see cref="ICommandLineCommand.TryParseArgument" /> |
| 37 | /// </summary> |
| 38 | public abstract bool TryParseArgument(ICommandLineParser parser, string argument); |
| 39 | } |
| 40 | } |