public IDisposable GetTaskFrame(SyncActivity activity)
        {
            PublicFolderActivityPerformanceTracker publicFolderActivityPerformanceTracker;

            if (!this.performanceTrackers.TryGetValue(activity, out publicFolderActivityPerformanceTracker))
            {
                publicFolderActivityPerformanceTracker = new PublicFolderActivityPerformanceTracker(activity, this.FolderOperationCounter, this.SyncStateCounter, this.MRSProxyLatencyInfo, this.transientRetryDelayTracker);
                this.performanceTrackers[activity]     = publicFolderActivityPerformanceTracker;
            }
            return(new PublicFolderPerformanceLogger.TaskFrame(activity, publicFolderActivityPerformanceTracker));
        }
            public TaskFrame(SyncActivity activity, PublicFolderActivityPerformanceTracker performanceTracker)
            {
                IActivityScope currentActivityScope = ActivityContext.GetCurrentActivityScope();

                if (currentActivityScope != null)
                {
                    this.previousActionDescription = currentActivityScope.Action;
                    currentActivityScope.Action    = activity.ToString();
                }
                this.performanceTracker = performanceTracker;
                this.performanceTracker.Start();
            }