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; }
private async void Decompose(string decodedMessage) { LoggerRemote loggerRemote = null; loggerRemote = JsonConvert.DeserializeObject <LoggerRemote>(decodedMessage, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, }); ThreadHelper.Generic.BeginInvoke(() => { if (errorLogger == null) { errorLogger = new ErrorLog(); visualizer.AddVisualizer(errorLogger as IVisualizer); } errorLogger.AddStatement(loggerRemote); }); }