예제 #1
0
 public void SetSession(ProfileSession session)
 {
     _session = session;
     Show();
     ((ProfilingProgressWindowContent)Content).SetSession(session);
     // listener shall be added after SetSession to allow ProfilingProgressWindowContent processing events first
     session.AddListener(_listener);
     Show(); // why double Show: trying to fix the problem - window not visible
 }
예제 #2
0
        public void StartSession(ProfileSession session)
        {
            if (SessionActive)
            {
                throw new InvalidOperationException();
            }

            _currentSession = session;
            _currentSession.AddListener(new ProfileSessionListener {
                OnStateChanged = StateChangedHandler
            });
            _currentSession.Start();
        }
        /// <summary>
        /// Set a current session for <see cref="ProfilingProgressWindowContent"/>.
        /// </summary>
        /// <param name="session">The session interface.</param>
        public void SetSession(ProfileSession session)
        {
            ClearSession(false);

            _session = session;

            session.AddListener(_sessionListener);

            _sysInfoProcessor = new QueuedAsynchronousProcessor <SysInfoItem>(ProcessTargetSysInfo);
            _eventsProcessor  = new QueuedAsynchronousProcessor <Event>(ProcessProfilerEvent);

            CaptionText.Text = Path.GetFileName(session.Configuration.TargetDll);

            LegendItemDebug.Visibility = (session.IsLiveProfiling ? Visibility.Visible : Visibility.Collapsed);
        }