예제 #1
0
 bool IsMatch(AttachableProcessInfo info)
 {
     if (processNameRegexes.Length != 0)
     {
         if (!processNameRegexes.Any(a => a.IsMatch(info.Name)))
         {
             return(false);
         }
     }
     return(true);
 }
 void AddOptions(AttachProgramOptions options)
 {
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     lock (lockObj) {
         var info = AttachableProcessInfo.Create(processProvider, options);
         if (IsMatch(info))
         {
             result.Add(new AttachableProcessImpl(dbgManager.Value, options, info));
         }
     }
 }
 bool IsMatch(AttachableProcessInfo info) => IsValidProcessName(info.Name) && IsValidProcessId(info.ProcessId);
예제 #4
0
 public AttachableProcessImpl(DbgManager dbgManager, AttachProgramOptions attachProgramOptions, AttachableProcessInfo attachableProcessInfo)
 {
     this.dbgManager            = dbgManager ?? throw new ArgumentNullException(nameof(dbgManager));
     this.attachProgramOptions  = attachProgramOptions ?? throw new ArgumentNullException(nameof(attachProgramOptions));
     this.attachableProcessInfo = attachableProcessInfo ?? throw new ArgumentNullException(nameof(attachableProcessInfo));
 }