Skip to content

Commit 6651936

Browse files
committed
构造函数重载
1 parent 2342dad commit 6651936

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

WebApiClient/ProxyInfo.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ public class ProxyInfo
3232
/// </summary>
3333
public string Password { get; set; }
3434

35+
/// <summary>
36+
/// 代理信息
37+
/// </summary>
38+
/// <param name="proxyAddress">代理服务器地址</param>
39+
/// <exception cref="ArgumentNullException"></exception>
40+
/// <exception cref="ArgumentException"></exception>
41+
/// <exception cref="ArgumentOutOfRangeException"></exception>
42+
/// <exception cref="UriFormatException"></exception>
43+
public ProxyInfo(string proxyAddress)
44+
: this(new Uri(proxyAddress ?? throw new ArgumentNullException(nameof(proxyAddress))))
45+
{
46+
}
47+
3548
/// <summary>
3649
/// 代理信息
3750
/// </summary>

0 commit comments

Comments
 (0)