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

◆ GetComponentsHelper()

string System.Uri.GetComponentsHelper ( UriComponents uriComponents,
UriFormat uriFormat )
inlinepackage

Definition at line 4229 of file Uri.cs.

4230 {
4231 if (uriComponents == UriComponents.Scheme)
4232 {
4233 return _syntax.SchemeName;
4234 }
4235 if (((uint)uriComponents & 0x80000000u) != 0)
4236 {
4237 uriComponents |= UriComponents.AbsoluteUri;
4238 }
4240 if ((uriComponents & UriComponents.NormalizedHost) != 0)
4241 {
4243 }
4244 if ((uriComponents & UriComponents.Host) != 0)
4245 {
4247 }
4248 if (uriComponents == UriComponents.Port || uriComponents == UriComponents.StrongPort)
4249 {
4250 if ((_flags & Flags.NotDefaultPort) != Flags.Zero || (uriComponents == UriComponents.StrongPort && _syntax.DefaultPort != -1))
4251 {
4253 }
4254 return string.Empty;
4255 }
4256 if ((uriComponents & UriComponents.StrongPort) != 0)
4257 {
4259 }
4260 if (uriComponents == UriComponents.Host && (uriFormat == UriFormat.UriEscaped || (_flags & (Flags.HostNotCanonical | Flags.E_HostNotCanonical)) == Flags.Zero))
4261 {
4263 return _info.Host;
4264 }
4265 switch (uriFormat)
4266 {
4267 case UriFormat.UriEscaped:
4269 case UriFormat.Unescaped:
4270 case UriFormat.SafeUnescaped:
4271 case (UriFormat)32767:
4273 default:
4274 throw new ArgumentOutOfRangeException("uriFormat");
4275 }
4276 }
static CultureInfo InvariantCulture
string SchemeName
Definition UriParser.cs:81
string Host
Definition Uri.cs:85
Offset Offset
Definition Uri.cs:81
UriParser _syntax
Definition Uri.cs:193
void EnsureParseRemaining()
Definition Uri.cs:636
string GetUnescapedParts(UriComponents uriParts, UriFormat formatAs)
Definition Uri.cs:1862
Flags _flags
Definition Uri.cs:195
void EnsureHostString(bool allowDnsOptimization)
Definition Uri.cs:644
string GetEscapedParts(UriComponents uriParts)
Definition Uri.cs:1833
UriInfo _info
Definition Uri.cs:197
UriFormat
Definition UriFormat.cs:4
ushort PortValue
Definition Uri.cs:117

References System.Uri._flags, System.Uri._info, System.Uri._syntax, System.Runtime.Serialization.Dictionary, System.Uri.EnsureHostString(), System.Uri.EnsureParseRemaining(), System.Uri.GetEscapedParts(), System.Uri.GetUnescapedParts(), System.Uri.UriInfo.Host, System.Globalization.CultureInfo.InvariantCulture, System.Uri.UriInfo.Offset, System.Uri.Offset.PortValue, and System.UriParser.SchemeName.

Referenced by System.UriParser.GetComponents(), System.Uri.InternalGetComponents(), and System.Uri.ToString().