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