Ejemplo n.º 1
0
        private void OnControllerTargetStopped(object sender, ProfilingTargetControllerEventArgs e)
        {
            VerifyDisposed();
            IProfilingTargetController controller = (IProfilingTargetController)sender;

            lock (_controllers)
            {
                _controllers.Remove(controller);
            }
            controller.TargetStopped -= OnControllerTargetStopped;
        }
Ejemplo n.º 2
0
        public void Activate()
        {
            VerifyDisposed();
            IProfilingTargetAdapter    adapter    = _profilingTarget.GetSafeAdapter();
            IProfilingTargetController controller = adapter.CreateController(_configurationSettings);

            //Select all Frameworks that involved into profiling and notify them
            foreach (FrameworkSettings frameworkSettings in _configurationSettings.FrameworksSettings)
            {
                IFramework        framework        = _frameworks[frameworkSettings.Uid];
                IFrameworkAdapter frameworkAdapter = framework.GetSafeAdapter();
                frameworkAdapter.ConfigureForProfiling(_configurationSettings);
            }
            //Start profiling
            controller.Start();
            controller.TargetStopped += OnControllerTargetStopped;
            lock (_controllers)
            {
                _controllers.Add(controller);
            }
        }
Ejemplo n.º 3
0
 public static void RaiseEvent(EventHandler <ProfilingTargetControllerEventArgs> handler, IProfilingTargetController sender)
 {
     EventExtensions.RaiseEventSafeAndSilent(handler, sender, () => new ProfilingTargetControllerEventArgs());
 }