Definition at line 4149 of file Uri.cs.
4150 {
4153 {
4155 {
4157 }
4160 }
4161 else
4162 {
4163 text =
string.Empty;
4164 }
4165 if (
text.Length > 0 && (UriHelper.IsLWS(
text[0]) || UriHelper.IsLWS(
text[
text.Length - 1])))
4166 {
4167 text =
text.Trim(UriHelper.s_WSchars);
4168 }
4169 if (
text.Length == 0)
4170 {
4172 return null;
4173 }
4174 if (
text[0] ==
'#' && !baseUri.IsImplicitFile && baseUri.Syntax.InFact(UriSyntaxFlags.MayHaveFragment))
4175 {
4177 return null;
4178 }
4179 if (
text[0] ==
'?' && !baseUri.IsImplicitFile && baseUri.Syntax.InFact(UriSyntaxFlags.MayHaveQuery))
4180 {
4182 return null;
4183 }
4184 if (
text.Length >= 3 && (
text[1] ==
':' ||
text[1] ==
'|') && UriHelper.IsAsciiLetter(
text[0]) && (
text[2] ==
'\\' ||
text[2] ==
'/'))
4185 {
4186 if (baseUri.IsImplicitFile)
4187 {
4189 return null;
4190 }
4191 if (baseUri.Syntax.InFact(UriSyntaxFlags.AllowDOSPath))
4192 {
4194 return null;
4195 }
4196 }
4199 {
4200 return baseUri;
4201 }
4202 return null;
4203 }
static void GetCombinedString(Uri baseUri, string relativeStr, bool dontEscape, ref string result)
References System.Uri._string, System.Runtime.Serialization.Dictionary, System.Uri.GetCombinedString(), System.Uri.GetParts(), System.Uri.InFact(), System.UriParser.InFact(), System.UriHelper.IsAsciiLetter(), System.Uri.IsImplicitFile, System.UriHelper.IsLWS(), System.UriHelper.s_WSchars, System.Uri.Scheme, System.Uri.Syntax, System.text, and System.Uri.UserEscaped.
Referenced by System.Uri.Uri(), System.Uri.CreateUri(), System.Uri.IsBaseOfHelper(), System.UriParser.Resolve(), and System.Uri.TryCreate().