Example #1
0
        private void OnDiagnostics(DiagnosticsEventArgs e)
        {
            var d = Diagnostics;

            if (d != null)
            {
                d(this, e);
            }
        }
Example #2
0
        private void HostDiagnostics(object sender, DiagnosticsEventArgs e)
        {
            var proj = _state.Workspace.Projects.SingleOrDefault(p => p.Id == e.ContextId);

            if (proj == null)
            {
                return;
            }

            UpdateNode <ProjectEntry>(proj.RelativePath, (p, c) => p.WithDiagnostics(e.Errors, e.Warnings, c), (s, c) =>
            {
                // Workspace will be "updated" at this point, even though the update is about to be culled away, as it is empty
                Core.Utils.RegisterChange((JObject)c.Property(Core.Utils.NameOf(() => s.Workspace)).Value, () => s.Workspace.ErrorList, s.Workspace.ErrorList, null);
                return(s);
            });
        }
Example #3
0
 private static void DiagnosticsEventHandler(Object o, DiagnosticsEventArgs e)
 {
     Trace.TraceInformation("{0}:{1}:{2}", e.Source, e.Level, e.Message);
 }