diff options
Diffstat (limited to 'src/test/burn/ForTestingUseOnlyExtension/Symbols/ForTestingUseOnlySymbolDefinitions.cs')
| -rw-r--r-- | src/test/burn/ForTestingUseOnlyExtension/Symbols/ForTestingUseOnlySymbolDefinitions.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/test/burn/ForTestingUseOnlyExtension/Symbols/ForTestingUseOnlySymbolDefinitions.cs b/src/test/burn/ForTestingUseOnlyExtension/Symbols/ForTestingUseOnlySymbolDefinitions.cs new file mode 100644 index 00000000..82c3833e --- /dev/null +++ b/src/test/burn/ForTestingUseOnlyExtension/Symbols/ForTestingUseOnlySymbolDefinitions.cs | |||
| @@ -0,0 +1,43 @@ | |||
| 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 ForTestingUseOnly | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using WixToolset.Data; | ||
| 7 | using WixToolset.Data.Burn; | ||
| 8 | |||
| 9 | public enum ForTestingUseOnlySymbolDefinitionType | ||
| 10 | { | ||
| 11 | ForTestingUseOnlyBundle, | ||
| 12 | } | ||
| 13 | |||
| 14 | public static partial class ForTestingUseOnlySymbolDefinitions | ||
| 15 | { | ||
| 16 | public static IntermediateSymbolDefinition ByName(string name) | ||
| 17 | { | ||
| 18 | if (!Enum.TryParse(name, out ForTestingUseOnlySymbolDefinitionType type)) | ||
| 19 | { | ||
| 20 | return null; | ||
| 21 | } | ||
| 22 | |||
| 23 | return ByType(type); | ||
| 24 | } | ||
| 25 | |||
| 26 | public static IntermediateSymbolDefinition ByType(ForTestingUseOnlySymbolDefinitionType type) | ||
| 27 | { | ||
| 28 | switch (type) | ||
| 29 | { | ||
| 30 | case ForTestingUseOnlySymbolDefinitionType.ForTestingUseOnlyBundle: | ||
| 31 | return ForTestingUseOnlySymbolDefinitions.ForTestingUseOnlyBundle; | ||
| 32 | |||
| 33 | default: | ||
| 34 | throw new ArgumentOutOfRangeException(nameof(type)); | ||
| 35 | } | ||
| 36 | } | ||
| 37 | |||
| 38 | static ForTestingUseOnlySymbolDefinitions() | ||
| 39 | { | ||
| 40 | ForTestingUseOnlyBundle.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | } | ||
