UtilProcessForEachProcessByNameGetT Method

Performs an action on all the Process objects found of running processes with the specified name.

Definition

Namespace: DevCase.Core.Diagnostics.Processes
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static IEnumerable<T> ForEachProcessByNameGet<T>(
	string processName,
	Func<Process, T> predicate,
	bool throwOnProcessNotFound = false
)

Parameters

processName  String
The process name.
predicate  FuncProcess, T
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.

Type Parameters

T
The Type of the value to return.

Return Value

IEnumerableT
If successful, the returning value is an IEnumerableT; otherwise, if throwOnProcessNotFound is and any process was found with the specified name.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Exceptions

ArgumentException Any process found with the specified name.;processName

See Also