mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 20:54:58 +00:00
feat: Adding constructors to IcdUriBuilder
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using ICD.Common.Utils.Extensions;
|
||||||
|
|
||||||
namespace ICD.Common.Utils
|
namespace ICD.Common.Utils
|
||||||
{
|
{
|
||||||
@@ -57,6 +58,38 @@ namespace ICD.Common.Utils
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor.
|
||||||
|
/// </summary>
|
||||||
|
public IcdUriBuilder()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uri"></param>
|
||||||
|
public IcdUriBuilder(string uri)
|
||||||
|
: this(new Uri(uri))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uri"></param>
|
||||||
|
public IcdUriBuilder(Uri uri)
|
||||||
|
{
|
||||||
|
Fragment = uri.Fragment;
|
||||||
|
Host = uri.Host;
|
||||||
|
Password = uri.GetPassword();
|
||||||
|
Path = uri.AbsolutePath;
|
||||||
|
Port = (ushort)uri.Port;
|
||||||
|
Query = uri.Query;
|
||||||
|
Scheme = uri.Scheme;
|
||||||
|
UserName = uri.GetUserName();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Builds the string representation for the URI.
|
/// Builds the string representation for the URI.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user