-
Notifications
You must be signed in to change notification settings - Fork 9.9k
/
UriEndPoint.cs
30 lines (26 loc) · 953 Bytes
/
UriEndPoint.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Net;
namespace Microsoft.AspNetCore.Connections
{
/// <summary>
/// An <see cref="EndPoint"/> defined by a <see cref="System.Uri"/>.
/// </summary>
public class UriEndPoint : EndPoint
{
/// <summary>
/// Initializes a new instance of the <see cref="UriEndPoint"/> class.
/// </summary>
/// <param name="uri">The <see cref="System.Uri"/> defining the <see cref="EndPoint"/>.</param>
public UriEndPoint(Uri uri)
{
Uri = uri ?? throw new ArgumentNullException(nameof(uri));
}
/// <summary>
/// The <see cref="System.Uri"/> defining the <see cref="EndPoint"/>.
/// </summary>
public Uri Uri { get; }
public override string ToString() => Uri.ToString();
}
}