projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ed5c20
)
Avoid a boxing allocation in UriBuilder.ToString
author
James Ko
<jamesqko@gmail.com>
Mon, 4 Jul 2016 04:31:17 +0000
(
00:31
-0400)
committer
GitHub
<noreply@github.com>
Mon, 4 Jul 2016 04:31:17 +0000
(
00:31
-0400)
Commit migrated from https://github.com/dotnet/corefx/commit/
7b2d47dfb6a735280aca8f3eca3008586a0dc359
src/libraries/System.Private.Uri/src/System/UriBuilder.cs
patch
|
blob
|
history
diff --git
a/src/libraries/System.Private.Uri/src/System/UriBuilder.cs
b/src/libraries/System.Private.Uri/src/System/UriBuilder.cs
index
761c67b
..
a84f33c
100644
(file)
--- a/
src/libraries/System.Private.Uri/src/System/UriBuilder.cs
+++ b/
src/libraries/System.Private.Uri/src/System/UriBuilder.cs
@@
-416,7
+416,7
@@
namespace System
+ ((_password.Length > 0) ? (":" + _password) : string.Empty)
+ ((_username.Length > 0) ? "@" : string.Empty)
+ _host
- + (((_port != -1) && (_host.Length > 0)) ? (":" + _port) : string.Empty)
+ + (((_port != -1) && (_host.Length > 0)) ? (":" + _port
.ToString()
) : string.Empty)
+ (((_host.Length > 0) && (_path.Length != 0) && (_path[0] != '/')) ? "/" : string.Empty) + _path
+ _query
+ _fragment;