UtilProcessForEachProcessByName Method
Performs an action on all the Process objects found of running processes with the specified name.
Namespace: DevCase.Core.Diagnostics.ProcessesAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void ForEachProcessByName(
string processName,
Action<Process> predicate,
bool throwOnProcessNotFound = false
)
Public Shared Sub ForEachProcessByName (
processName As String,
predicate As Action(Of Process),
Optional throwOnProcessNotFound As Boolean = false
)
Dim processName As String
Dim predicate As Action(Of Process)
Dim throwOnProcessNotFound As Boolean
UtilProcess.ForEachProcessByName(processName,
predicate, throwOnProcessNotFound)
public:
static void ForEachProcessByName(
String^ processName,
Action<Process^>^ predicate,
bool throwOnProcessNotFound = false
)
static member ForEachProcessByName :
processName : string *
predicate : Action<Process> *
?throwOnProcessNotFound : bool
(* Defaults:
let _throwOnProcessNotFound = defaultArg throwOnProcessNotFound false
*)
-> unit
No code example is currently available or this language may not be supported.
Parameters
- processName String
-
The process name.
- predicate ActionProcess
-
A transform function to apply to each process found.
- throwOnProcessNotFound Boolean (Optional)
-
If , throws an ArgumentException exception if any process was found with the specified name.
This is a code example.
No code example is currently available or this language may not be supported.
ForEachProcessByName("notepad.exe", Sub(p As Process) p.PriorityClass = ProcessPriorityClass.Normal, throwOnProcessNotFound:=True)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
ArgumentException
|
No processes found with the specified name.;processName
|