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; }
internal void AddSQLStatement(SqlRemote sqlRemote) { StackPanelStatements.Text += "exec " + sqlRemote.CommandText + " " + formatSQL(sqlRemote.SqlParameters) + "\r\n\r\n"; // StackPanelStatements.Items.Add("exec " + sqlRemote.CommandText + " " + formatSQL(sqlRemote.SqlParameters)); // string text = "exec " + cmd.CommandText; }