mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
feat: IcdUriBuilder better supports null Uris
This commit is contained in:
parent
1721116908
commit
e4e3e9b91a
1 changed files with 4 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ namespace ICD.Common.Utils
|
||||||
/// Constructor.
|
/// Constructor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IcdUriBuilder()
|
public IcdUriBuilder()
|
||||||
|
: this((Uri)null)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,6 +81,9 @@ namespace ICD.Common.Utils
|
||||||
/// <param name="uri"></param>
|
/// <param name="uri"></param>
|
||||||
public IcdUriBuilder(Uri uri)
|
public IcdUriBuilder(Uri uri)
|
||||||
{
|
{
|
||||||
|
if (uri == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!uri.IsAbsoluteUri)
|
if (!uri.IsAbsoluteUri)
|
||||||
uri = new Uri(Uri.UriSchemeHttp + Uri.SchemeDelimiter + uri);
|
uri = new Uri(Uri.UriSchemeHttp + Uri.SchemeDelimiter + uri);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue