mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
15 lines
360 B
C#
15 lines
360 B
C#
namespace Velopack.Tests.OldSquirrel;
|
|
|
|
internal static class Utility
|
|
{
|
|
public static bool IsHttpUrl(string urlOrPath)
|
|
{
|
|
var uri = default(Uri);
|
|
if (!Uri.TryCreate(urlOrPath, UriKind.Absolute, out uri)) {
|
|
return false;
|
|
}
|
|
|
|
return uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps;
|
|
}
|
|
}
|