diff options
Diffstat (limited to 'src/wixext/BalExtensionData.cs')
-rw-r--r-- | src/wixext/BalExtensionData.cs | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/wixext/BalExtensionData.cs b/src/wixext/BalExtensionData.cs new file mode 100644 index 00000000..7e8dea5b --- /dev/null +++ b/src/wixext/BalExtensionData.cs | |||
@@ -0,0 +1,55 @@ | |||
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 WixToolset.Extensions | ||
4 | { | ||
5 | using System; | ||
6 | using System.Reflection; | ||
7 | using WixToolset.Data; | ||
8 | using WixToolset.Extensibility; | ||
9 | |||
10 | /// <summary> | ||
11 | /// The WiX Toolset Bal Extension. | ||
12 | /// </summary> | ||
13 | public sealed class BalExtensionData : ExtensionData | ||
14 | { | ||
15 | /// <summary> | ||
16 | /// Gets the optional table definitions for this extension. | ||
17 | /// </summary> | ||
18 | /// <value>The optional table definitions for this extension.</value> | ||
19 | public override TableDefinitionCollection TableDefinitions | ||
20 | { | ||
21 | get | ||
22 | { | ||
23 | return BalExtensionData.GetExtensionTableDefinitions(); | ||
24 | } | ||
25 | } | ||
26 | |||
27 | /// <summary> | ||
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 | { | ||
34 | return BalExtensionData.GetExtensionLibrary(tableDefinitions); | ||
35 | } | ||
36 | |||
37 | /// <summary> | ||
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 | { | ||
52 | return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.bal.wixlib", tableDefinitions); | ||
53 | } | ||
54 | } | ||
55 | } | ||