From bd1221e36ee3e493dc25bd32559f846519fe60d0 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Mon, 3 Aug 2020 12:16:21 +0300 Subject: Refactored RemoteSQL on procedures. Fixed issue with generic types display on code editor. Added line wrap toggle to procedure designer output. --- .../SQL/RemoteSqlColumnCollection.cs | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlColumnCollection.cs') 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 + { + 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; + } + } +} -- cgit v1.3.1