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 --- .../RowDictionary.cs | 83 ---------------------- 1 file changed, 83 deletions(-) delete mode 100644 src/WixToolset.Data.WindowsInstaller/RowDictionary.cs (limited to 'src/WixToolset.Data.WindowsInstaller/RowDictionary.cs') diff --git a/src/WixToolset.Data.WindowsInstaller/RowDictionary.cs b/src/WixToolset.Data.WindowsInstaller/RowDictionary.cs deleted file mode 100644 index 5756db71..00000000 --- a/src/WixToolset.Data.WindowsInstaller/RowDictionary.cs +++ /dev/null @@ -1,83 +0,0 @@ -// 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.Data -{ - using System; - using System.Collections.Generic; - - /// - /// A dictionary of rows. Unlike the this - /// will throw when multiple rows with the same key are added. - /// - public sealed class RowDictionary : Dictionary where T : Row - { - /// - /// Creates an empty . - /// - public RowDictionary() - : base(StringComparer.InvariantCulture) - { - } - - /// - /// Creates and populates a with the rows from the given enumerator. - /// - /// Rows to add. - public RowDictionary(IEnumerable rows) - : this() - { - foreach (T row in rows) - { - this.Add(row); - } - } - - /// - /// Creates and populates a with the rows from the given . - /// - /// The table to index. - /// - /// Rows added to the index are not automatically added to the given . - /// - public RowDictionary(Table table) - : this() - { - if (null != table) - { - foreach (T row in table.Rows) - { - this.Add(row); - } - } - } - - /// - /// Adds a row to the dictionary using the row key. - /// - /// Row to add to the dictionary. - public void Add(T row) - { - this.Add(row.GetKey(), row); - } - - /// - /// Gets the row by integer key. - /// - /// Integer key to look up. - /// Row or null if key is not found. - public T Get(int key) - { - return this.Get(key.ToString()); - } - - /// - /// Gets the row by string key. - /// - /// String key to look up. - /// Row or null if key is not found. - public T Get(string key) - { - return this.TryGetValue(key, out var result) ? result : null; - } - } -} -- cgit v1.2.3-55-g6feb