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

◆ IsPrefix()

static bool System.Net.CredentialKey.IsPrefix ( Uri uri,
Uri prefixUri )
inlinestaticprivate

Definition at line 39 of file CredentialKey.cs.

40 {
41 if (prefixUri.Scheme != uri.Scheme || prefixUri.Host != uri.Host || prefixUri.Port != uri.Port)
42 {
43 return false;
44 }
45 int num = prefixUri.AbsolutePath.LastIndexOf('/');
46 if (num > uri.AbsolutePath.LastIndexOf('/'))
47 {
48 return false;
49 }
50 return string.Compare(uri.AbsolutePath, 0, prefixUri.AbsolutePath, 0, num, StringComparison.OrdinalIgnoreCase) == 0;
51 }

References System.Uri.AbsolutePath, System.Uri.Host, System.Uri.Port, and System.Uri.Scheme.

Referenced by System.Net.CredentialKey.Match().