From b86e235ef4f9423624fc93e1c417484e938245df Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 24 Oct 2018 15:03:23 -0700 Subject: Re-organize command-line processing and add support for custom commands --- .../BaseExtensionCommandLine.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/WixToolset.Extensibility/BaseExtensionCommandLine.cs (limited to 'src/WixToolset.Extensibility/BaseExtensionCommandLine.cs') diff --git a/src/WixToolset.Extensibility/BaseExtensionCommandLine.cs b/src/WixToolset.Extensibility/BaseExtensionCommandLine.cs new file mode 100644 index 00000000..77e8a5bd --- /dev/null +++ b/src/WixToolset.Extensibility/BaseExtensionCommandLine.cs @@ -0,0 +1,33 @@ +// 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. + +namespace WixToolset.Extensibility +{ + using System.Collections.Generic; + using System.Linq; + using WixToolset.Extensibility.Data; + using WixToolset.Extensibility.Services; + + public abstract class BaseExtensionCommandLine : IExtensionCommandLine + { + public IEnumerable CommandLineSwitches => Enumerable.Empty(); + + public virtual void PostParse() + { + } + + public virtual void PreParse(ICommandLineContext context) + { + } + + public virtual bool TryParseArgument(ICommandLineParser parser, string argument) + { + return false; + } + + public virtual bool TryParseCommand(ICommandLineParser parser, out ICommandLineCommand command) + { + command = null; + return false; + } + } +} -- cgit v1.2.3-55-g6feb