aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs
new file mode 100644
index 000000000..5358e047b
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs
@@ -0,0 +1,47 @@
+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<RemoteSqlColumn>
+ {
+ private Dictionary<String, RemoteSqlColumn> _dictionary;
+
+ public RemoteSqlColumnCollection()
+ {
+ _dictionary = new Dictionary<string, RemoteSqlColumn>();
+ }
+
+ 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;
+ }
+ }
+}