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 --- .../TableIndexedCollection.cs | 153 --------------------- 1 file changed, 153 deletions(-) delete mode 100644 src/WixToolset.Data.WindowsInstaller/TableIndexedCollection.cs (limited to 'src/WixToolset.Data.WindowsInstaller/TableIndexedCollection.cs') diff --git a/src/WixToolset.Data.WindowsInstaller/TableIndexedCollection.cs b/src/WixToolset.Data.WindowsInstaller/TableIndexedCollection.cs deleted file mode 100644 index 9f85efff..00000000 --- a/src/WixToolset.Data.WindowsInstaller/TableIndexedCollection.cs +++ /dev/null @@ -1,153 +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; - using System.Linq; - - /// - /// Collection for tables. - /// - public sealed class TableIndexedCollection : ICollection - { - private Dictionary collection; - - /// - /// Instantiate a new empty collection. - /// - public TableIndexedCollection() - { - this.collection = new Dictionary(); - } - - /// - /// Instantiate a new collection populated with a set of tables. - /// - /// Set of tables. - public TableIndexedCollection(IEnumerable
tables) - { - this.collection = tables.ToDictionary(t => t.Name); - } - - /// - /// Gets the number of items in the collection. - /// - /// Number of items in collection. - public int Count - { - get { return this.collection.Count; } - } - - /// - /// Table indexed collection is never read only. - /// - public bool IsReadOnly - { - get { return false; } - } - - /// - /// Adds a table to the collection. - /// - /// Table to add to the collection. - /// Indexes the table by name. - public void Add(Table table) - { - this.collection.Add(table.Name, table); - } - - /// - /// Clear the tables from the collection. - /// - public void Clear() - { - this.collection.Clear(); - } - - /// - /// Determines if a table is in the collection. - /// - /// Table to check if it is in the collection. - /// True if the table name is in the collection, otherwise false. - public bool Contains(Table table) - { - return this.collection.ContainsKey(table.Name); - } - - /// - /// Copies the collection into an array. - /// - /// Array to copy the collection into. - /// Index to start copying from. - public void CopyTo(Table[] array, int arrayIndex) - { - this.collection.Values.CopyTo(array, arrayIndex); - } - - /// - /// Remove a table from the collection by name. - /// - /// Table name to remove from the collection. - public void Remove(string tableName) - { - this.collection.Remove(tableName); - } - - /// - /// Remove a table from the collection. - /// - /// Table with matching name to remove from the collection. - public bool Remove(Table table) - { - return this.collection.Remove(table.Name); - } - - /// - /// Gets an enumerator over the whole collection. - /// - /// Collection enumerator. - public IEnumerator
GetEnumerator() - { - return this.collection.Values.GetEnumerator(); - } - - /// - /// Gets an untyped enumerator over the whole collection. - /// - /// Untyped collection enumerator. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return this.collection.Values.GetEnumerator(); - } - - /// - /// Gets a table by name. - /// - /// Name of table to locate. - public Table this[string tableName] - { - get - { - Table table; - return this.collection.TryGetValue(tableName, out table) ? table : null; - } - - set - { - this.collection[tableName] = value; - } - } - - /// - /// Tries to find a table by name. - /// - /// Table name to locate. - /// Found table. - /// True if table with table name was found, otherwise false. - public bool TryGetTable(string tableName, out Table table) - { - return this.collection.TryGetValue(tableName, out table); - } - } -} -- cgit v1.2.3-55-g6feb