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

◆ EnsureState()

void System.Diagnostics.Process.EnsureState ( State state)
inlineprivate

Definition at line 1006 of file Process.cs.

1007 {
1008 if ((state & State.Associated) != 0 && !Associated)
1009 {
1011 }
1012 if ((state & State.HaveId) != 0)
1013 {
1014 if (!_haveProcessId)
1015 {
1016 if (!_haveProcessHandle)
1017 {
1018 EnsureState(State.Associated);
1020 }
1021 SetProcessId(ProcessManager.GetProcessIdFromHandle(_processHandle));
1022 }
1023 _ = state & State.HaveNonExitedId;
1024 _ = 5;
1025 }
1026 if ((state & State.IsLocal) != 0 && _isRemoteMachine)
1027 {
1028 throw new NotSupportedException(System.SR.NotSupportedRemote);
1029 }
1030 if ((state & State.HaveProcessInfo) != 0 && _processInfo == null)
1031 {
1032 if ((state & State.HaveNonExitedId) != State.HaveNonExitedId)
1033 {
1034 EnsureState(State.HaveNonExitedId);
1035 }
1036 _processInfo = ProcessManager.GetProcessInfo(_processId, _machineName);
1037 if (_processInfo == null)
1038 {
1040 }
1041 }
1042 if ((state & State.Exited) != 0)
1043 {
1044 if (!HasExited)
1045 {
1047 }
1048 if (!_haveProcessHandle)
1049 {
1051 }
1052 }
1053 }
SafeProcessHandle _processHandle
Definition Process.cs:98
void EnsureState(State state)
Definition Process.cs:1006
void SetProcessId(int processId)
Definition Process.cs:1185
static string NoProcessInfo
Definition SR.cs:20
static string WaitTillExit
Definition SR.cs:22
static string NoAssociatedProcess
Definition SR.cs:14
static string NoProcessHandle
Definition SR.cs:24
static string NotSupportedRemote
Definition SR.cs:18
static string ProcessIdRequired
Definition SR.cs:16
Definition SR.cs:7

References System.Diagnostics.Process._haveProcessHandle, System.Diagnostics.Process._haveProcessId, System.Diagnostics.Process._isRemoteMachine, System.Diagnostics.Process._machineName, System.Diagnostics.Process._processHandle, System.Diagnostics.Process._processId, System.Diagnostics.Process._processInfo, System.Diagnostics.Process.Associated, System.Diagnostics.Process.EnsureState(), System.Diagnostics.ProcessManager.GetProcessIdFromHandle(), System.Diagnostics.ProcessManager.GetProcessInfo(), System.Diagnostics.Process.HasExited, System.SR.NoAssociatedProcess, System.SR.NoProcessHandle, System.SR.NoProcessInfo, System.SR.NotSupportedRemote, System.SR.ProcessIdRequired, System.Diagnostics.Process.SetProcessId(), System.state, and System.SR.WaitTillExit.

Referenced by System.Diagnostics.Process.EnsureState(), System.Diagnostics.Process.GetProcessHandle(), and System.Diagnostics.Process.Kill().