using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tango.PPC.Shared.SQL { public class RemoteSqlColumnCollection : Collection { private Dictionary _dictionary; public RemoteSqlColumnCollection() { _dictionary = new Dictionary(); } protected override void InsertItem(int index, RemoteSqlColumn item) { item.Index = Count; _dictionary.Add(item.Name, item); base.InsertItem(index, item); } protected override void RemoveItem(int index) { throw new NotSupportedException(); } protected override void ClearItems() { _dictionary.Clear(); base.ClearItems(); } protected override void SetItem(int index, RemoteSqlColumn item) { throw new NotSupportedException(); } public int GetIndexOf(String columnName) { return _dictionary[columnName].Index; } } }