diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-08-03 17:59:13 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-08-03 17:59:13 +0300 |
| commit | 9b5873a2e69a8e0f394fecc3c1e2923444fc46e1 (patch) | |
| tree | 5b5271a8cf4eaade3439fe64e71fba1ee48899a7 /Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs | |
| parent | 29367e183afdf3ffa17cb9ec4d3869b93cb4764d (diff) | |
| parent | c1acb1d70b48d0ce31b5ff1a12086a50e264bc77 (diff) | |
| download | Tango-9b5873a2e69a8e0f394fecc3c1e2923444fc46e1.tar.gz Tango-9b5873a2e69a8e0f394fecc3c1e2923444fc46e1.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_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.cs | 47 |
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; + } + } +} |
