Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Close()

void System.Diagnostics.Process.Close ( )
inline

Definition at line 949 of file Process.cs.

950 {
951 if (!Associated)
952 {
953 return;
954 }
955 lock (this)
956 {
958 }
960 {
962 _processHandle = null;
963 _haveProcessHandle = false;
964 }
965 _haveProcessId = false;
966 _isRemoteMachine = false;
967 _machineName = ".";
968 _raisedOnExited = false;
969 try
970 {
971 if (_standardOutput != null && (_outputStreamReadMode == StreamReadMode.AsyncMode || _outputStreamReadMode == StreamReadMode.Undefined))
972 {
973 if (_outputStreamReadMode == StreamReadMode.AsyncMode)
974 {
976 _output?.Dispose();
977 }
979 }
980 if (_standardError != null && (_errorStreamReadMode == StreamReadMode.AsyncMode || _errorStreamReadMode == StreamReadMode.Undefined))
981 {
982 if (_errorStreamReadMode == StreamReadMode.AsyncMode)
983 {
985 _error?.Dispose();
986 }
988 }
990 {
992 }
993 }
994 finally
995 {
996 _standardOutput = null;
997 _standardInput = null;
998 _standardError = null;
999 _output = null;
1000 _error = null;
1001 CloseCore();
1002 Refresh();
1003 }
1004 }
SafeProcessHandle _processHandle
Definition Process.cs:98
StreamReader _standardError
Definition Process.cs:156
StreamWriter _standardInput
Definition Process.cs:154
StreamReadMode _outputStreamReadMode
Definition Process.cs:162
StreamReadMode _errorStreamReadMode
Definition Process.cs:164
AsyncStreamReader _output
Definition Process.cs:166
AsyncStreamReader _error
Definition Process.cs:168
StreamReader _standardOutput
Definition Process.cs:152
override void Close()
override void Close()

References System.Diagnostics.Process._error, System.Diagnostics.Process._errorStreamReadMode, System.Diagnostics.Process._haveProcessHandle, System.Diagnostics.Process._haveProcessId, System.Diagnostics.Process._isRemoteMachine, System.Diagnostics.Process._machineName, System.Diagnostics.Process._output, System.Diagnostics.Process._outputStreamReadMode, System.Diagnostics.Process._processHandle, System.Diagnostics.Process._raisedOnExited, System.Diagnostics.Process._standardError, System.Diagnostics.Process._standardInput, System.Diagnostics.Process._standardInputAccessed, System.Diagnostics.Process._standardOutput, System.Diagnostics.Process.Associated, System.Diagnostics.AsyncStreamReader.CancelOperation(), System.IO.StreamReader.Close(), System.IO.StreamWriter.Close(), System.Diagnostics.Process.CloseCore(), System.Runtime.Serialization.Dictionary, System.Diagnostics.AsyncStreamReader.Dispose(), System.Runtime.InteropServices.SafeHandle.Dispose(), System.Diagnostics.Process.Refresh(), and System.Diagnostics.Process.StopWatchingForExit().

Referenced by System.Diagnostics.Process.Dispose(), and System.Diagnostics.Process.Start().