From 49f1209035aac1fcfad5dbbe25f7b2306d3be86c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 7 Dec 2017 14:19:05 -0800 Subject: Support MSI backends creating custom tables and remove WixToolset.Data.WindowsInstaller --- src/WixToolset.Core.Burn/TableExtensions.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/WixToolset.Core.Burn/TableExtensions.cs (limited to 'src/WixToolset.Core.Burn/TableExtensions.cs') 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 @@ +// 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. + +namespace WixToolset.Core.Burn +{ + using System.Collections.Generic; + using System.Linq; + using WixToolset.Data.WindowsInstaller; + + /// + /// Methods that extend . + /// + public static class TableExtensions + { + /// + /// Gets the rows contained in the table as a particular row type. + /// + /// Table to get rows from. + /// If the is null, an empty enumerable will be returned. + public static IEnumerable RowsAs(this Table table) where T : Row + { + return (null == table) ? Enumerable.Empty() : table.Rows.Cast(); + } + } +} -- cgit v1.2.3-55-g6feb