|
7 | 7 |
|
8 | 8 | namespace Microsoft.AspNetCore.Server.HttpSys |
9 | 9 | { |
| 10 | + /// <summary> |
| 11 | + /// A set of URL parameters used to listen for incoming requests. |
| 12 | + /// </summary> |
10 | 13 | public class UrlPrefix |
11 | 14 | { |
12 | 15 | private UrlPrefix(bool isHttps, string scheme, string host, string port, int portValue, string path) |
@@ -94,6 +97,10 @@ public static UrlPrefix Create(string scheme, string host, int? portValue, strin |
94 | 97 | return new UrlPrefix(isHttps, scheme, host, port, portValue.Value, path); |
95 | 98 | } |
96 | 99 |
|
| 100 | + /// <summary> |
| 101 | + /// http://msdn.microsoft.com/en-us/library/windows/desktop/aa364698(v=vs.85).aspx |
| 102 | + /// </summary> |
| 103 | + /// <param name="prefix">The string that the <see cref="UrlPrefix"/> will be created from.</param> |
97 | 104 | public static UrlPrefix Create(string prefix) |
98 | 105 | { |
99 | 106 | string scheme = null; |
@@ -146,26 +153,58 @@ public static UrlPrefix Create(string prefix) |
146 | 153 | return Create(scheme, host, port, path); |
147 | 154 | } |
148 | 155 |
|
| 156 | + /// <summary> |
| 157 | + /// Gets a value that determines if the prefix's scheme is HTTPS. |
| 158 | + /// </summary> |
149 | 159 | public bool IsHttps { get; } |
| 160 | + |
| 161 | + /// <summary> |
| 162 | + /// Gets the scheme used by the prefix. |
| 163 | + /// </summary> |
150 | 164 | public string Scheme { get; } |
| 165 | + |
| 166 | + /// <summary> |
| 167 | + /// Gets the host domain name used by the prefix. |
| 168 | + /// </summary> |
151 | 169 | public string Host { get; } |
| 170 | + |
| 171 | + /// <summary> |
| 172 | + /// Gets a string representation of the port used by the prefix. |
| 173 | + /// </summary> |
152 | 174 | public string Port { get; } |
| 175 | + |
153 | 176 | internal string HostAndPort { get; } |
| 177 | + |
| 178 | + /// <summary> |
| 179 | + /// Gets an integer representation of the port used by the prefix. |
| 180 | + /// </summary> |
154 | 181 | public int PortValue { get; } |
| 182 | + |
| 183 | + /// <summary> |
| 184 | + /// Gets the path component of the prefix. |
| 185 | + /// </summary> |
155 | 186 | public string Path { get; } |
| 187 | + |
156 | 188 | internal string PathWithoutTrailingSlash { get; } |
| 189 | + |
| 190 | + /// <summary> |
| 191 | + /// Gets a string representation of the prefix |
| 192 | + /// </summary> |
157 | 193 | public string FullPrefix { get; } |
158 | 194 |
|
| 195 | + /// <inheritdoc /> |
159 | 196 | public override bool Equals(object obj) |
160 | 197 | { |
161 | 198 | return string.Equals(FullPrefix, Convert.ToString(obj), StringComparison.OrdinalIgnoreCase); |
162 | 199 | } |
163 | 200 |
|
| 201 | + /// <inheritdoc /> |
164 | 202 | public override int GetHashCode() |
165 | 203 | { |
166 | 204 | return StringComparer.OrdinalIgnoreCase.GetHashCode(FullPrefix); |
167 | 205 | } |
168 | 206 |
|
| 207 | + /// <inheritdoc /> |
169 | 208 | public override string ToString() |
170 | 209 | { |
171 | 210 | return FullPrefix; |
|
0 commit comments