public static void SetWithExceptionHandling(string label, ThreadCounter threadCounter, ClientContext clientContext, RequestLogger requestLogger, ThreadContext.ExecuteDelegate executeDelegate) { ThreadContext.Set(label, threadCounter, clientContext, requestLogger, delegate() { try { GrayException.MapAndReportGrayExceptions(delegate() { executeDelegate(); }); } catch (GrayException arg) { string arg2 = (clientContext != null) ? clientContext.IdentityForFilteredTracing : "none"; ThreadContext.Tracer.TraceError <string, GrayException>(0L, "{0}: failed with exception: {1}", arg2, arg); } }); }
private void CompleteAsync(object notUsed) { ThreadContext.SetWithExceptionHandling(this.traceLabel, base.Application.Worker, base.ClientContext, base.RequestLogger, new ThreadContext.ExecuteDelegate(this.Complete)); }
private static void RefreshTimer(object notUsed) { ThreadContext.SetWithExceptionHandling("ConfigurationReader.RefreshTimer", DummyApplication.Instance.Worker, null, null, new ThreadContext.ExecuteDelegate(ConfigurationReader.Refresh)); }