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

◆ UriBuilder() [7/7]

System.UriBuilder.UriBuilder ( string? scheme,
string? host,
int port,
string? path,
string? extraValue )
inline

Definition at line 227 of file UriBuilder.cs.

228 : this(scheme, host, port, path)
229 {
230 if (string.IsNullOrEmpty(extraValue))
231 {
232 return;
233 }
234 if (extraValue[0] == '#')
235 {
236 _fragment = extraValue;
237 }
238 else
239 {
240 if (extraValue[0] != '?')
241 {
242 throw new ArgumentException(System.SR.Argument_ExtraNotValid, "extraValue");
243 }
244 int num = extraValue.IndexOf('#');
245 if (num == -1)
246 {
247 _query = extraValue;
248 }
249 else
250 {
251 _query = extraValue.Substring(0, num);
252 _fragment = extraValue.Substring(num);
253 }
254 }
255 if (_query.Length == 1)
256 {
257 _query = string.Empty;
258 }
259 if (_fragment.Length == 1)
260 {
261 _fragment = string.Empty;
262 }
263 }
static string Argument_ExtraNotValid
Definition SR.cs:56
Definition SR.cs:7

References System.UriBuilder._fragment, System.UriBuilder._query, and System.SR.Argument_ExtraNotValid.