コード例 #1
0
        public IProfilingTargetController CreateController(ConfigurationSettings settings)
        {
            ProfilingTargetSettings   profilingTargetSettings = new ProfilingTargetSettings(settings.ProfilingTargetSettings);
            ProfilingTargetController controller = new ProfilingTargetController(profilingTargetSettings);

            return(controller);
        }
コード例 #2
0
 public bool CanStartProfiling(ConfigurationSettings settings, int processId)
 {
     using (Process process = Process.GetProcessById(processId))
     {
         ProfilingTargetSettings profilingTargetSettings = new ProfilingTargetSettings(settings.ProfilingTargetSettings);
         string targetProcessName = Path.GetFileNameWithoutExtension(profilingTargetSettings.FileFullName);
         if (!string.Equals(process.ProcessName, targetProcessName, StringComparison.InvariantCultureIgnoreCase))
         {
             return(false);
         }
     }
     return(true);
 }
コード例 #3
0
 public ProfilingTargetController(ProfilingTargetSettings settings)
 {
     _settings = settings;
 }