diff options
| author | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-03-27 01:28:24 +0100 |
|---|---|---|
| committer | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-03-27 01:28:24 +0100 |
| commit | 1c13be085fbc30ac6c5efa893f415fa0d06d557f (patch) | |
| tree | 89bb96464edea083664498203837c1bbcb7b99bb /MediaBrowser.Common/Extensions/ProcessExtensions.cs | |
| parent | 48bbcbb426b15724ccae05c71d418c8ce80cfb68 (diff) | |
Make HasExitedSafe() private
Diffstat (limited to 'MediaBrowser.Common/Extensions/ProcessExtensions.cs')
| -rw-r--r-- | MediaBrowser.Common/Extensions/ProcessExtensions.cs | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/MediaBrowser.Common/Extensions/ProcessExtensions.cs b/MediaBrowser.Common/Extensions/ProcessExtensions.cs index 938ced106..525475ba5 100644 --- a/MediaBrowser.Common/Extensions/ProcessExtensions.cs +++ b/MediaBrowser.Common/Extensions/ProcessExtensions.cs @@ -11,28 +11,6 @@ namespace MediaBrowser.Common.Extensions public static class ProcessExtensions { /// <summary> - /// Gets a value indicating whether the associated process has been terminated using - /// <see cref="Process.HasExited"/>. This is safe to call even if there is no operating system process - /// associated with the <see cref="Process"/>. - /// </summary> - /// <param name="process">The process to check the exit status for.</param> - /// <returns> - /// True if the operating system process referenced by the <see cref="Process"/> component has - /// terminated, or if there is no associated operating system process; otherwise, false. - /// </returns> - public static bool HasExitedSafe(this Process process) - { - try - { - return process.HasExited; - } - catch (InvalidOperationException) - { - return true; - } - } - - /// <summary> /// Asynchronously wait for the process to exit. /// </summary> /// <param name="process">The process to wait for.</param> @@ -75,5 +53,27 @@ namespace MediaBrowser.Common.Extensions return await tcs.Task.ConfigureAwait(false); } } + + /// <summary> + /// Gets a value indicating whether the associated process has been terminated using + /// <see cref="Process.HasExited"/>. This is safe to call even if there is no operating system process + /// associated with the <see cref="Process"/>. + /// </summary> + /// <param name="process">The process to check the exit status for.</param> + /// <returns> + /// True if the operating system process referenced by the <see cref="Process"/> component has + /// terminated, or if there is no associated operating system process; otherwise, false. + /// </returns> + private static bool HasExitedSafe(this Process process) + { + try + { + return process.HasExited; + } + catch (InvalidOperationException) + { + return true; + } + } } } |
