private async void Decompose(string decodedMessage) { SqlRemote sqlRemote = null; try { sqlRemote = JsonConvert.DeserializeObject <SqlRemote>(decodedMessage, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, }); string connectionString = sqlRemote.ConnectionString; ThreadHelper.Generic.BeginInvoke(() => { if (!DBWatchers.ContainsKey(connectionString)) { SQLViz sqlViz = new SQLViz(); sqlViz.ConnectionString = connectionString; DBWatchers.Add(connectionString, sqlViz); visualizer.AddVisualizer(sqlViz as IVisualizer); } DBWatchers[connectionString].AddSQLStatement(sqlRemote); }); } catch { } return; }
public VisualizerHost() { InitializeComponent(); InitalizeMefComponents(); _messageServer = new MessageServer(this); System.Threading.Thread t = new System.Threading.Thread(_messageServer.Monitor); t.Start(); #if DEBUGUI SQLViz s = new SQLViz() { ConnectionString = "Server / Database", }; AddVisualizer(s); #endif }