Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Removed redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
voltura authored and da2x committed Jun 10, 2021
1 parent 69ad543 commit c182a6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 2 additions & 7 deletions EdgeDeflector/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
* License-Filename: LICENSE
*/

using Microsoft.Win32;
using System;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Security.Principal;
using System.Text.RegularExpressions;
using System.Web;

Expand All @@ -23,7 +21,7 @@ static bool IsUri(string uristring)
Uri uri = new Uri(uristring);
return true;
}
catch (System.UriFormatException)
catch (UriFormatException)
{
}
catch (ArgumentNullException)
Expand All @@ -34,13 +32,11 @@ static bool IsUri(string uristring)

static bool IsHttpUri(string uri)
{
uri = uri.ToUpperInvariant();
return uri.StartsWith("HTTPS://", StringComparison.OrdinalIgnoreCase) || uri.StartsWith("HTTP://", StringComparison.OrdinalIgnoreCase);
}

static bool IsMsEdgeUri(string uri)
{
uri = uri.ToUpperInvariant();
return uri.StartsWith("MICROSOFT-EDGE:", StringComparison.OrdinalIgnoreCase) && !uri.Contains(" ");
}

Expand Down Expand Up @@ -89,9 +85,8 @@ static void OpenUri(string uri)
Environment.Exit(1);
}

ProcessStartInfo launcher = new ProcessStartInfo()
ProcessStartInfo launcher = new ProcessStartInfo(uri)
{
FileName = uri,
UseShellExecute = true
};
Process.Start(launcher);
Expand Down
1 change: 0 additions & 1 deletion EdgeDeflector/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down

0 comments on commit c182a6b

Please sign in to comment.