From 4194343c39fa66778a8de9804c88789bd41dae48 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 4 May 2021 22:47:19 -0700 Subject: Move Http.wixext into ext --- .../Http/wixext/Symbols/HttpSymbolDefinitions.cs | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/ext/Http/wixext/Symbols/HttpSymbolDefinitions.cs (limited to 'src/ext/Http/wixext/Symbols/HttpSymbolDefinitions.cs') diff --git a/src/ext/Http/wixext/Symbols/HttpSymbolDefinitions.cs b/src/ext/Http/wixext/Symbols/HttpSymbolDefinitions.cs new file mode 100644 index 00000000..2aa03468 --- /dev/null +++ b/src/ext/Http/wixext/Symbols/HttpSymbolDefinitions.cs @@ -0,0 +1,47 @@ +// 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.Http +{ + using System; + using WixToolset.Data; + + public enum HttpSymbolDefinitionType + { + WixHttpSniSslCert, + WixHttpUrlAce, + WixHttpUrlReservation, + } + + public static partial class HttpSymbolDefinitions + { + public static readonly Version Version = new Version("4.0.0"); + + public static IntermediateSymbolDefinition ByName(string name) + { + if (!Enum.TryParse(name, out HttpSymbolDefinitionType type)) + { + return null; + } + + return ByType(type); + } + + public static IntermediateSymbolDefinition ByType(HttpSymbolDefinitionType type) + { + switch (type) + { + case HttpSymbolDefinitionType.WixHttpSniSslCert: + return HttpSymbolDefinitions.WixHttpSniSslCert; + + case HttpSymbolDefinitionType.WixHttpUrlAce: + return HttpSymbolDefinitions.WixHttpUrlAce; + + case HttpSymbolDefinitionType.WixHttpUrlReservation: + return HttpSymbolDefinitions.WixHttpUrlReservation; + + default: + throw new ArgumentOutOfRangeException(nameof(type)); + } + } + } +} -- cgit v1.2.3-55-g6feb