aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2020-08-05 00:28:48 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2020-08-05 00:28:48 +0300
commitcd8ef321bd713d967fa0f436bd6720566a71c66a (patch)
tree7684de6993ae237d49e3ddf148148a3cc47c9b62 /Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs
parent054b6ca55142fae5bb30a9b8f3301f7e71a92296 (diff)
parentb9700510ad42a7b869596924edb03ad38c47675c (diff)
downloadTango-cd8ef321bd713d967fa0f436bd6720566a71c66a.tar.gz
Tango-cd8ef321bd713d967fa0f436bd6720566a71c66a.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
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;
+ }
+ }
+}