diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-07 14:19:05 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-07 14:19:05 -0800 |
| commit | 49f1209035aac1fcfad5dbbe25f7b2306d3be86c (patch) | |
| tree | 6ce5921493eb751b6d89c3faf0ebdf64110cbb65 /src/WixToolset.Core.Burn/TableExtensions.cs | |
| parent | b1e662bd480241ea914f0f3d6bd174d9ffd03f5f (diff) | |
| download | wix-49f1209035aac1fcfad5dbbe25f7b2306d3be86c.tar.gz wix-49f1209035aac1fcfad5dbbe25f7b2306d3be86c.tar.bz2 wix-49f1209035aac1fcfad5dbbe25f7b2306d3be86c.zip | |
Support MSI backends creating custom tables and remove WixToolset.Data.WindowsInstaller
Diffstat (limited to 'src/WixToolset.Core.Burn/TableExtensions.cs')
| -rw-r--r-- | src/WixToolset.Core.Burn/TableExtensions.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/WixToolset.Core.Burn/TableExtensions.cs b/src/WixToolset.Core.Burn/TableExtensions.cs new file mode 100644 index 00000000..465bf870 --- /dev/null +++ b/src/WixToolset.Core.Burn/TableExtensions.cs | |||
| @@ -0,0 +1,24 @@ | |||
| 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.Core.Burn | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | using System.Linq; | ||
| 7 | using WixToolset.Data.WindowsInstaller; | ||
| 8 | |||
| 9 | /// <summary> | ||
| 10 | /// Methods that extend <see cref="Table"/>. | ||
| 11 | /// </summary> | ||
| 12 | public static class TableExtensions | ||
| 13 | { | ||
| 14 | /// <summary> | ||
| 15 | /// Gets the rows contained in the table as a particular row type. | ||
| 16 | /// </summary> | ||
| 17 | /// <param name="table">Table to get rows from.</param> | ||
| 18 | /// <remarks>If the <paramref name="table"/> is null, an empty enumerable will be returned.</remarks> | ||
| 19 | public static IEnumerable<T> RowsAs<T>(this Table table) where T : Row | ||
| 20 | { | ||
| 21 | return (null == table) ? Enumerable.Empty<T>() : table.Rows.Cast<T>(); | ||
| 22 | } | ||
| 23 | } | ||
| 24 | } | ||
