Exemplo n.º 1
0
        void ShowDiffOfOpenSnapshots()
        {
            if (m_UIState.diffMode != null)
            {
                SwitchSnapshotMode(UIState.ViewMode.ShowDiff);
            }
            else if (First != null && Second != null)
            {
                try
                {
                    MemoryProfilerAnalytics.StartEvent <MemoryProfilerAnalytics.DiffedSnapshotEvent>();

                    m_UIState.DiffLastAndCurrentSnapshot(First.GuiData.UtcDateTime.CompareTo(Second.GuiData.UtcDateTime) < 0);

                    MemoryProfilerAnalytics.EndEvent(new MemoryProfilerAnalytics.DiffedSnapshotEvent());
                }
                catch (Exception)
                {
                    throw;
                }
            }
            else
            {
                Debug.LogError("No second snapshot opened to diff to!");
            }
        }
Exemplo n.º 2
0
        void ShowDiffOfOpenSnapshots()
        {
            if (m_UIState.diffMode != null)
            {
                SwitchSnapshotMode(UIState.ViewMode.ShowDiff);
            }
            else if (First != null && Second != null)
            {
                try
                {
                    using (new Service <IDebugContextService> .ScopeService(new DebugContextService()))
                    {
                        MemoryProfilerAnalytics.StartEvent <MemoryProfilerAnalytics.DiffedSnapshotEvent>();

                        m_UIState.DiffLastAndCurrentSnapshot(First.GuiData.UtcDateTime.CompareTo(Second.GuiData.UtcDateTime) < 0);

                        MemoryProfilerAnalytics.EndEvent(new MemoryProfilerAnalytics.DiffedSnapshotEvent());
                    }
                }
                catch (ExitGUIException)
                {
                    throw;
                }
                catch (Exception e)
                {
                    throw new Exception(DebugUtility.GetExceptionHelpMessage(e));
                }
            }
            else
            {
                Debug.LogError("No second snapshot opened to diff to!");
            }
        }