// Token: 0x060009B4 RID: 2484 RVA: 0x0002B978 File Offset: 0x00029B78
        internal static T InvokeWithAPILog <T>(DateTime whenUTC, string name, Guid activityId, string implementation, string caller, Func <T> action, Func <string> getDcFunc)
        {
            T         result    = default(T);
            Exception ex        = null;
            Stopwatch stopwatch = Stopwatch.StartNew();

            try
            {
                result = action();
            }
            catch (Exception ex2)
            {
                ex = ex2;
                throw;
            }
            finally
            {
                stopwatch.Stop();
                try
                {
                    ADScenarioLog.BeginAppend(whenUTC, name, implementation, stopwatch.ElapsedMilliseconds, activityId, caller, (ex == null) ? "" : ex.ToString(), getDcFunc());
                }
                catch (Exception arg)
                {
                    ExTraceGlobals.GeneralTracer.TraceError <Exception>((long)default(Guid).GetHashCode(), "Failed to create API logging with exception {0}", arg);
                }
            }
            return(result);
        }
        // Token: 0x060009B3 RID: 2483 RVA: 0x0002B898 File Offset: 0x00029A98
        internal static T InvokeGetObjectAPIAndLog <T>(DateTime whenUTC, string name, Guid activityId, string implementation, string caller, Func <T> action, Func <string> getDcFunc) where T : ADRawEntry
        {
            T         t         = default(T);
            Exception ex        = null;
            Stopwatch stopwatch = Stopwatch.StartNew();

            try
            {
                t = action();
            }
            catch (Exception ex2)
            {
                ex = ex2;
                throw;
            }
            finally
            {
                stopwatch.Stop();
                try
                {
                    string server;
                    if (t != null && t.IsCached)
                    {
                        server = string.Empty;
                    }
                    else
                    {
                        server = getDcFunc();
                    }
                    ADScenarioLog.BeginAppend(whenUTC, name, implementation, stopwatch.ElapsedMilliseconds, activityId, caller, (ex == null) ? "" : ex.ToString(), server);
                }
                catch (Exception arg)
                {
                    ExTraceGlobals.GeneralTracer.TraceError <Exception>((long)default(Guid).GetHashCode(), "Failed to create API logging with exception {0}", arg);
                }
            }
            return(t);
        }