wasSharpNET

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 20  →  ?path2? @ 22
/Platform/Windows/Commands/NetSH/URLACL.cs
@@ -6,21 +6,19 @@
 
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using Process = System.Diagnostics.Process;
 
namespace wasSharpNET.Platform.Windows.Commands.NetSH
{
public class URLACL
{
private string domain;
private string URL;
private readonly string domain;
private readonly string URL;
 
private readonly Regex URLReservationRegex;
private string username;
private int timeout;
private readonly string username;
private readonly int timeout;
 
public URLACL(string URL, string username, string domain, int timeout)
{
@@ -31,7 +29,7 @@
 
URLReservationRegex =
new Regex(
$@"{Regex.Escape(URL)}.*{Regex.Escape(string.Format(@"{0}\{1}", domain, username))}",
$@"{Regex.Escape(URL)}.*{Regex.Escape($@"{domain}\{username}")}",
RegexOptions.Singleline | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase |
RegexOptions.Compiled);
}
@@ -41,13 +39,15 @@
get
{
var netSHOutput = new StringBuilder();
var checkProcess = new System.Diagnostics.Process();
checkProcess.StartInfo = new ProcessStartInfo("netsh", @"http show urlacl")
var checkProcess = new System.Diagnostics.Process
{
RedirectStandardOutput = true,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = false
StartInfo = new ProcessStartInfo("netsh", @"http show urlacl")
{
RedirectStandardOutput = true,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = false
}
};
 
checkProcess.OutputDataReceived += (sender, output) =>