aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/PSExtensionData.cs
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2019-01-19 12:11:35 -0600
committerSean Hall <r.sean.hall@gmail.com>2019-01-19 12:11:35 -0600
commitdcfc3e2e369958d58dc070e3dbb8992e147b7a05 (patch)
tree57c204d599de769d9a7d4d8e4cd0c16552269e35 /src/wixext/PSExtensionData.cs
parent4693356db89da3f23a112bc32aae13adee6d266e (diff)
downloadwix-dcfc3e2e369958d58dc070e3dbb8992e147b7a05.tar.gz
wix-dcfc3e2e369958d58dc070e3dbb8992e147b7a05.tar.bz2
wix-dcfc3e2e369958d58dc070e3dbb8992e147b7a05.zip
Import code from old v4 repo
Diffstat (limited to 'src/wixext/PSExtensionData.cs')
-rw-r--r--src/wixext/PSExtensionData.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/wixext/PSExtensionData.cs b/src/wixext/PSExtensionData.cs
new file mode 100644
index 00000000..578bda91
--- /dev/null
+++ b/src/wixext/PSExtensionData.cs
@@ -0,0 +1,34 @@
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
3namespace 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 PowerShell Extension.
12 /// </summary>
13 public sealed class PSExtensionData : ExtensionData
14 {
15 /// <summary>
16 /// Gets the library associated with this extension.
17 /// </summary>
18 /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
19 /// <returns>The loaded library.</returns>
20 public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
21 {
22 return PSExtensionData.GetExtensionLibrary(tableDefinitions);
23 }
24
25 /// <summary>
26 /// Internal mechanism to access the extension's library.
27 /// </summary>
28 /// <returns>Extension's library.</returns>
29 internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
30 {
31 return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.ps.wixlib", tableDefinitions);
32 }
33 }
34}