diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-08-03 12:16:21 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-08-03 12:16:21 +0300 |
| commit | bd1221e36ee3e493dc25bd32559f846519fe60d0 (patch) | |
| tree | e4462d6672223b1fb43ee017e256e13301cec9f2 /Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs | |
| parent | 99cbacc067251a3841fc1aca99e029146ed11c15 (diff) | |
| download | Tango-bd1221e36ee3e493dc25bd32559f846519fe60d0.tar.gz Tango-bd1221e36ee3e493dc25bd32559f846519fe60d0.zip | |
Refactored RemoteSQL on procedures.
Fixed issue with generic types display on code editor.
Added line wrap toggle to procedure designer output.
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; + } + } +} |
