diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2019-01-20 11:09:10 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2019-01-20 11:15:09 -0600 |
| commit | 87527d58d18fa719dc7a5ce512369485d907cba4 (patch) | |
| tree | 9bcfd603f11b73846fd1985c2b732920b209fcaf /src/wixext/HttpExtensionData.cs | |
| parent | 4d30ab70573f9734d7fd3cd4d54c02173fa281db (diff) | |
| download | wix-87527d58d18fa719dc7a5ce512369485d907cba4.tar.gz wix-87527d58d18fa719dc7a5ce512369485d907cba4.tar.bz2 wix-87527d58d18fa719dc7a5ce512369485d907cba4.zip | |
Integrate into latest v4.
Diffstat (limited to 'src/wixext/HttpExtensionData.cs')
| -rw-r--r-- | src/wixext/HttpExtensionData.cs | 50 |
1 files changed, 8 insertions, 42 deletions
diff --git a/src/wixext/HttpExtensionData.cs b/src/wixext/HttpExtensionData.cs index db79a6c1..2ae4a911 100644 --- a/src/wixext/HttpExtensionData.cs +++ b/src/wixext/HttpExtensionData.cs | |||
| @@ -1,64 +1,30 @@ | |||
| 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. | 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 | 2 | ||
| 3 | namespace WixToolset.Extensions | 3 | namespace WixToolset.Http |
| 4 | { | 4 | { |
| 5 | using System; | ||
| 6 | using System.Reflection; | ||
| 7 | using WixToolset.Data; | 5 | using WixToolset.Data; |
| 8 | using WixToolset.Extensibility; | 6 | using WixToolset.Extensibility; |
| 9 | 7 | ||
| 10 | /// <summary> | 8 | /// <summary> |
| 11 | /// The WiX Toolset Http Extension. | 9 | /// The WiX Toolset Http Extension. |
| 12 | /// </summary> | 10 | /// </summary> |
| 13 | public sealed class HttpExtensionData : ExtensionData | 11 | public sealed class HttpExtensionData : BaseExtensionData |
| 14 | { | 12 | { |
| 15 | /// <summary> | 13 | /// <summary> |
| 16 | /// Gets the default culture. | 14 | /// Gets the default culture. |
| 17 | /// </summary> | 15 | /// </summary> |
| 18 | /// <value>The default culture.</value> | 16 | /// <value>The default culture.</value> |
| 19 | public override string DefaultCulture | 17 | public override string DefaultCulture => "en-US"; |
| 20 | { | ||
| 21 | get { return "en-us"; } | ||
| 22 | } | ||
| 23 | |||
| 24 | /// <summary> | ||
| 25 | /// Gets the optional table definitions for this extension. | ||
| 26 | /// </summary> | ||
| 27 | /// <value>The optional table definitions for this extension.</value> | ||
| 28 | public override TableDefinitionCollection TableDefinitions | ||
| 29 | { | ||
| 30 | get | ||
| 31 | { | ||
| 32 | return HttpExtensionData.GetExtensionTableDefinitions(); | ||
| 33 | } | ||
| 34 | } | ||
| 35 | |||
| 36 | /// <summary> | ||
| 37 | /// Gets the library associated with this extension. | ||
| 38 | /// </summary> | ||
| 39 | /// <param name="tableDefinitions">The table definitions to use while loading the library.</param> | ||
| 40 | /// <returns>The loaded library.</returns> | ||
| 41 | public override Library GetLibrary(TableDefinitionCollection tableDefinitions) | ||
| 42 | { | ||
| 43 | return HttpExtensionData.GetExtensionLibrary(tableDefinitions); | ||
| 44 | } | ||
| 45 | 18 | ||
| 46 | /// <summary> | 19 | public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) |
| 47 | /// Internal mechanism to access the extension's table definitions. | ||
| 48 | /// </summary> | ||
| 49 | /// <returns>Extension's table definitions.</returns> | ||
| 50 | internal static TableDefinitionCollection GetExtensionTableDefinitions() | ||
| 51 | { | 20 | { |
| 52 | return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml"); | 21 | tupleDefinition = HttpTupleDefinitions.ByName(name); |
| 22 | return tupleDefinition != null; | ||
| 53 | } | 23 | } |
| 54 | 24 | ||
| 55 | /// <summary> | 25 | public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) |
| 56 | /// Internal mechanism to access the extension's library. | ||
| 57 | /// </summary> | ||
| 58 | /// <returns>Extension's library.</returns> | ||
| 59 | internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions) | ||
| 60 | { | 26 | { |
| 61 | return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.http.wixlib", tableDefinitions); | 27 | return Intermediate.Load(typeof(HttpExtensionData).Assembly, "WixToolset.Http.http.wixlib", tupleDefinitions); |
| 62 | } | 28 | } |
| 63 | } | 29 | } |
| 64 | } | 30 | } |
