wasSharpNET

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 11  →  ?path2? @ 16
/Platform/Windows/Commands/NetSH/URLACL.cs
@@ -12,17 +12,19 @@
{
public class URLACL
{
public string domain;
public string URL;
private string domain;
private string URL;
 
private readonly Regex URLReservationRegex;
public string username;
private string username;
private int timeout;
 
public URLACL(string URL, string username, string domain)
public URLACL(string URL, string username, string domain, int timeout)
{
this.URL = URL;
this.username = username;
this.domain = domain;
this.timeout = timeout;
 
URLReservationRegex =
new Regex(
@@ -56,7 +58,7 @@
 
checkProcess.Start();
checkProcess.BeginOutputReadLine();
checkProcess.WaitForExit();
checkProcess.WaitForExit(60000);
 
return URLReservationRegex.IsMatch(netSHOutput.ToString());
}
@@ -70,8 +72,8 @@
Verb = @"runas",
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true
}).WaitForExit();
UseShellExecute = false
}).WaitForExit(timeout);
}
 
public void Release()
@@ -82,8 +84,8 @@
Verb = @"runas",
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true
}).WaitForExit();
UseShellExecute = false
}).WaitForExit(timeout);
}
}
}