Ejemplo n.º 1
0
 public override void Dispose()
 {
     _requestServer.Dispose();
     _configurations.Dispose();
     _sessions.Dispose();
     _frameworks.Dispose();
     _profilingTargets.Dispose();
     _profilingTypes.Dispose();
     base.Dispose();
 }
 public void StopProfiling()
 {
     if (SessionState == SessionState.Profiling)
     {
         SessionState = SessionState.Decoding;
         //TODO: replace with closing from profiling target, because only it knows how to close profiled process safely.
         _requestServer.Dispose();
         _profiledProcess.Close();
         _profiledProcess.Dispose();
         _agentClient.Dispose();
         _profilingTypesManager.StopProfiling();
         _gatewayServer.Dispose();
         _agentLibrary.TryDispose();
         _profiledProcess.Exited -= OnProfiledProcessExited;
         _application.RaiseSessionStateChanged();
     }
 }