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

◆ NamedPipeClientStream() [6/7]

System.IO.Pipes.NamedPipeClientStream.NamedPipeClientStream ( string serverName,
string pipeName,
PipeDirection direction,
PipeOptions options,
TokenImpersonationLevel impersonationLevel,
HandleInheritability inheritability )
inline

Definition at line 63 of file NamedPipeClientStream.cs.

64 : base(direction, 0)
65 {
66 if (pipeName == null)
67 {
68 throw new ArgumentNullException("pipeName");
69 }
70 if (serverName == null)
71 {
72 throw new ArgumentNullException("serverName", System.SR.ArgumentNull_ServerName);
73 }
74 if (pipeName.Length == 0)
75 {
77 }
78 if (serverName.Length == 0)
79 {
81 }
82 if ((options & (PipeOptions)536870911) != 0)
83 {
84 throw new ArgumentOutOfRangeException("options", System.SR.ArgumentOutOfRange_OptionsInvalid);
85 }
86 if (impersonationLevel < TokenImpersonationLevel.None || impersonationLevel > TokenImpersonationLevel.Delegation)
87 {
88 throw new ArgumentOutOfRangeException("impersonationLevel", System.SR.ArgumentOutOfRange_ImpersonationInvalid);
89 }
90 if (inheritability < HandleInheritability.None || inheritability > HandleInheritability.Inheritable)
91 {
92 throw new ArgumentOutOfRangeException("inheritability", System.SR.ArgumentOutOfRange_HandleInheritabilityNoneOrInheritable);
93 }
94 if ((options & PipeOptions.CurrentUserOnly) != 0)
95 {
96 base.IsCurrentUserOnly = true;
97 }
98 _normalizedPipePath = PipeStream.GetPipePath(serverName, pipeName);
99 _direction = direction;
100 _inheritability = inheritability;
101 _impersonationLevel = impersonationLevel;
103 }
readonly TokenImpersonationLevel _impersonationLevel
readonly HandleInheritability _inheritability
PipeStream(PipeDirection direction, int bufferSize)
static string ArgumentOutOfRange_OptionsInvalid
Definition SR.cs:36
static string ArgumentOutOfRange_ImpersonationInvalid
Definition SR.cs:34
static string Argument_EmptyServerName
Definition SR.cs:22
static string ArgumentOutOfRange_HandleInheritabilityNoneOrInheritable
Definition SR.cs:38
static string ArgumentNull_ServerName
Definition SR.cs:26
static string Argument_NeedNonemptyPipeName
Definition SR.cs:18
Definition SR.cs:7

References System.IO.Pipes.NamedPipeClientStream._direction, System.IO.Pipes.NamedPipeClientStream._impersonationLevel, System.IO.Pipes.NamedPipeClientStream._inheritability, System.IO.Pipes.NamedPipeClientStream._normalizedPipePath, System.IO.Pipes.NamedPipeClientStream._pipeOptions, System.SR.Argument_EmptyServerName, System.SR.Argument_NeedNonemptyPipeName, System.SR.ArgumentNull_ServerName, System.SR.ArgumentOutOfRange_HandleInheritabilityNoneOrInheritable, System.SR.ArgumentOutOfRange_ImpersonationInvalid, System.SR.ArgumentOutOfRange_OptionsInvalid, System.IO.Pipes.PipeStream.GetPipePath(), and System.options.