Ejemplo n.º 1
0
        public static HeapAnalysisScope LoadMemoryDump(string filePath)
        {
            using (var tracker = new DisposableTracker())
            {
                var session = tracker.Track(DebugSession.Load(filePath));
                var subject = GetSubjectFromSession(session);

                return(tracker.TransferOwnershipTo(t => new HeapAnalysisScope(t, subject)));
            }
        }
Ejemplo n.º 2
0
        public static async Task <HeapAnalysisScope> Create()
        {
            using (var tracker = new DisposableTracker())
            {
                var session = await CreateDebugSession(tracker);

                var subject = GetSubjectFromSession(session);

                return(tracker.TransferOwnershipTo(t => new HeapAnalysisScope(t, subject)));
            }
        }