Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 30 additions & 11 deletions xml/System.Diagnostics/Process.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,7 @@ The following code example creates a process that prints a file. It sets the <xr

]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">You're attempting to access this property before the process has exited, when no process is associated with this object, or (on Windows) when there is no process handle available.</exception>
<exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.ExitTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
<altmember cref="P:System.Diagnostics.Process.Handle" />
<altmember cref="P:System.Diagnostics.Process.ExitCode" />
Expand Down Expand Up @@ -3573,11 +3574,14 @@ If no main module is found, it could be because the process hasn't finished load
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the privileged processor time for this process.</summary>
<summary>Gets the amount of time the process has spent running code inside the operating system core.</summary>
<value>A <see cref="T:System.TimeSpan" /> that indicates the amount of time that the process has spent running code inside the operating system core.</value>
<remarks>
<format type="text/markdown"><![CDATA[

On Windows, if a handle to the process is available, the value can be retrieved after the process exits.
On Unix, the value is unavailable after the process exits.

## Examples
The following example starts an instance of Notepad. The example then retrieves and displays various properties of the associated process. The example detects when the process exits, and displays the process's exit code.

Expand All @@ -3587,9 +3591,11 @@ If no main module is found, it could be because the process hasn't finished load

]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">No process is associated with this object. On Windows, there is no process handle available. On Unix, the process has exited.</exception>
<exception cref="T:System.ComponentModel.Win32Exception">The operating system could not retrieve process timing information.</exception>
<exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
<altmember cref="P:System.Diagnostics.Process.UserProcessorTime" />
<altmember cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" />
<altmember cref="P:System.Diagnostics.Process.TotalProcessorTime" />
</Docs>
</Member>
<Member MemberName="ProcessName">
Expand Down Expand Up @@ -5668,14 +5674,17 @@ The file specified in the <paramref name="fileName" /> could not be found.
</ReturnValue>
<Docs>
<summary>Gets the time that the associated process was started.</summary>
<value>An object that indicates when the process started. An exception is thrown if the process is not running.</value>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.StartTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
<exception cref="T:System.InvalidOperationException">The process has exited.
<value>A <see cref="T:System.DateTime" /> that indicates when the associated process was started.</value>
<remarks>
<format type="text/markdown"><![CDATA[

-or-
On Windows, if a handle to the process is available, this property can be read after the process has exited.
On Unix, this property caches its value on first access. A cached value can be read after the process has exited, but accessing an uncached value after the process has exited can throw <xref:System.InvalidOperationException> when the value is unavailable.
Comment thread
adamsitnik marked this conversation as resolved.

The process has not been started.</exception>
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.StartTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
<exception cref="T:System.InvalidOperationException">No process is associated with this object; on Windows, there is no process handle available; or on Unix, the value was not cached and is unavailable after the process exited.</exception>
Comment thread
adamsitnik marked this conversation as resolved.
<exception cref="T:System.ComponentModel.Win32Exception">An error occurred in the call to the Windows function.</exception>
</Docs>
</Member>
Expand Down Expand Up @@ -5892,11 +5901,14 @@ The file specified in the <paramref name="fileName" /> could not be found.
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the total processor time for this process.</summary>
<summary>Gets the amount of time the associated process has spent utilizing the CPU. This value is the sum of <see cref="P:System.Diagnostics.Process.UserProcessorTime" /> and <see cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" />.</summary>
<value>A <see cref="T:System.TimeSpan" /> that indicates the amount of time that the associated process has spent utilizing the CPU. This value is the sum of the <see cref="P:System.Diagnostics.Process.UserProcessorTime" /> and the <see cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[

On Windows, if a handle to the process is available, the value can be retrieved after the process exits.
On Unix, the value is unavailable after the process exits.

## Examples
The following example starts an instance of Notepad. The example then retrieves and displays various properties of the associated process. The example detects when the process exits, and displays the process's exit code.

Expand All @@ -5906,6 +5918,8 @@ The file specified in the <paramref name="fileName" /> could not be found.

]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">No process is associated with this object. On Windows, there is no process handle available. On Unix, the process has exited.</exception>
<exception cref="T:System.ComponentModel.Win32Exception">The operating system could not retrieve process timing information.</exception>
<exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.TotalProcessorTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
<altmember cref="P:System.Diagnostics.Process.UserProcessorTime" />
<altmember cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" />
Expand Down Expand Up @@ -5956,11 +5970,14 @@ The file specified in the <paramref name="fileName" /> could not be found.
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the user processor time for this process.</summary>
<summary>Gets the amount of time the associated process has spent running code inside the application portion of the process (not the operating system core).</summary>
<value>A <see cref="T:System.TimeSpan" /> that indicates the amount of time that the associated process has spent running code inside the application portion of the process (not inside the operating system core).</value>
<remarks>
<format type="text/markdown"><![CDATA[

On Windows, if a handle to the process is available, the value can be retrieved after the process exits.
On Unix, the value is unavailable after the process exits.

## Examples
The following example starts an instance of Notepad. The example then retrieves and displays various properties of the associated process. The example detects when the process exits, and displays the process's exit code.

Expand All @@ -5970,9 +5987,11 @@ The file specified in the <paramref name="fileName" /> could not be found.

]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">No process is associated with this object. On Windows, there is no process handle available. On Unix, the process has exited.</exception>
<exception cref="T:System.ComponentModel.Win32Exception">The operating system could not retrieve process timing information.</exception>
<exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.UserProcessorTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
<altmember cref="P:System.Diagnostics.Process.UserProcessorTime" />
<altmember cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" />
<altmember cref="P:System.Diagnostics.Process.TotalProcessorTime" />
</Docs>
</Member>
<Member MemberName="VirtualMemorySize">
Expand Down
Loading