From 5ba862bfa618c89a563d555e8ce7b44a904df406 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 6 Dec 2017 11:39:26 -0800 Subject: Add support for loading Intermediates from extensions --- .../ExamplePreprocessorExtensionAndCommandLine.cs | 46 ---------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs (limited to 'src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs') diff --git a/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs b/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs deleted file mode 100644 index 53394ea3..00000000 --- a/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs +++ /dev/null @@ -1,46 +0,0 @@ -// 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 Example.Extension -{ - using System; - using System.Collections.Generic; - using WixToolset.Extensibility; - using WixToolset.Extensibility.Services; - - internal class ExamplePreprocessorExtensionAndCommandLine : BasePreprocessorExtension, IExtensionCommandLine - { - private string exampleValueFromCommandLine; - - public IEnumerable CommandLineSwitches => throw new NotImplementedException(); - - public ExamplePreprocessorExtensionAndCommandLine() - { - this.Prefixes = new[] { "ex" }; - } - - public void PreParse(ICommandLineContext context) - { - } - - public bool TryParseArgument(IParseCommandLine parseCommandLine, string arg) - { - if (parseCommandLine.IsSwitch(arg) && arg.Substring(1).Equals("example", StringComparison.OrdinalIgnoreCase)) - { - parseCommandLine.GetNextArgumentOrError(ref this.exampleValueFromCommandLine); - return true; - } - - return false; - } - - public override string GetVariableValue(string prefix, string name) - { - if (prefix == "ex" && "test".Equals(name, StringComparison.OrdinalIgnoreCase)) - { - return String.IsNullOrWhiteSpace(this.exampleValueFromCommandLine) ? "(null)" : this.exampleValueFromCommandLine; - } - - return null; - } - } -} \ No newline at end of file -- cgit v1.2.3-55-g6feb