From 8cf0427984a88b0b3ddfb2061e5be721afffe82e Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 22 Apr 2021 17:19:56 -0700 Subject: Move Core into wix --- .../Example.Extension/ExampleSymbolDefinitions.cs | 67 ---------------------- 1 file changed, 67 deletions(-) delete mode 100644 src/test/Example.Extension/ExampleSymbolDefinitions.cs (limited to 'src/test/Example.Extension/ExampleSymbolDefinitions.cs') diff --git a/src/test/Example.Extension/ExampleSymbolDefinitions.cs b/src/test/Example.Extension/ExampleSymbolDefinitions.cs deleted file mode 100644 index f13d716d..00000000 --- a/src/test/Example.Extension/ExampleSymbolDefinitions.cs +++ /dev/null @@ -1,67 +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 WixToolset.Data; - using WixToolset.Data.Burn; - - public enum ExampleSymbolDefinitionType - { - Example, - ExampleSearch, - } - - public static class ExampleSymbolDefinitions - { - public static readonly IntermediateSymbolDefinition Example = new IntermediateSymbolDefinition( - ExampleSymbolDefinitionType.Example.ToString(), - new[] - { - new IntermediateFieldDefinition(nameof(ExampleSymbolFields.Value), IntermediateFieldType.String), - }, - typeof(ExampleSymbol)); - - public static readonly IntermediateSymbolDefinition ExampleSearch = new IntermediateSymbolDefinition( - ExampleSymbolDefinitionType.ExampleSearch.ToString(), - new[] - { - new IntermediateFieldDefinition(nameof(ExampleSearchSymbolFields.SearchFor), IntermediateFieldType.String), - }, - typeof(ExampleSearchSymbol)); - - static ExampleSymbolDefinitions() - { - ExampleSearch.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag); - } - - public static bool TryGetSymbolType(string name, out ExampleSymbolDefinitionType type) - { - return Enum.TryParse(name, out type); - } - - public static IntermediateSymbolDefinition ByName(string name) - { - if (!TryGetSymbolType(name, out var type)) - { - return null; - } - return ByType(type); - } - - public static IntermediateSymbolDefinition ByType(ExampleSymbolDefinitionType type) - { - switch (type) - { - case ExampleSymbolDefinitionType.Example: - return ExampleSymbolDefinitions.Example; - - case ExampleSymbolDefinitionType.ExampleSearch: - return ExampleSymbolDefinitions.ExampleSearch; - - default: - throw new ArgumentOutOfRangeException(nameof(type)); - } - } - } -} -- cgit v1.2.3-55-g6feb