From 87527d58d18fa719dc7a5ce512369485d907cba4 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 20 Jan 2019 11:09:10 -0600 Subject: Integrate into latest v4. --- src/wixext/Tuples/HttpTupleDefinitions.cs | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/wixext/Tuples/HttpTupleDefinitions.cs (limited to 'src/wixext/Tuples/HttpTupleDefinitions.cs') diff --git a/src/wixext/Tuples/HttpTupleDefinitions.cs b/src/wixext/Tuples/HttpTupleDefinitions.cs new file mode 100644 index 00000000..11305d2a --- /dev/null +++ b/src/wixext/Tuples/HttpTupleDefinitions.cs @@ -0,0 +1,43 @@ +// 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 HttpTupleDefinitionType + { + WixHttpUrlAce, + WixHttpUrlReservation, + } + + public static partial class HttpTupleDefinitions + { + public static readonly Version Version = new Version("4.0.0"); + + public static IntermediateTupleDefinition ByName(string name) + { + if (!Enum.TryParse(name, out HttpTupleDefinitionType type)) + { + return null; + } + + return ByType(type); + } + + public static IntermediateTupleDefinition ByType(HttpTupleDefinitionType type) + { + switch (type) + { + case HttpTupleDefinitionType.WixHttpUrlAce: + return HttpTupleDefinitions.WixHttpUrlAce; + + case HttpTupleDefinitionType.WixHttpUrlReservation: + return HttpTupleDefinitions.WixHttpUrlReservation; + + default: + throw new ArgumentOutOfRangeException(nameof(type)); + } + } + } +} -- cgit v1.2.3-55-g6feb