wasSharpNET

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 31  →  ?path2? @ 30
File deleted
\ No newline at end of file
/IO/FileSystemWatcher.cs
/Platform/Windows/Commands/NetSH/URLACL.cs
@@ -4,7 +4,6 @@
// rights of fair usage, the disclaimer and warranty conditions. //
///////////////////////////////////////////////////////////////////////////
 
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Text;
@@ -12,20 +11,21 @@
 
namespace wasSharpNET.Platform.Windows.Commands.NetSH
{
public class URLACL : IDisposable
public class URLACL
{
private string domain { get; set; }
private int timeout { get; set; } = 60000;
private string URL { get; set; }
private readonly string domain;
private readonly int timeout;
private readonly string URL;
 
private Regex URLReservationRegex { get; set; }
private string username { get; set; }
private readonly Regex URLReservationRegex;
private readonly string username;
 
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(
@@ -32,14 +32,9 @@
$@"{Regex.Escape(URL)}.*{Regex.Escape($@"{domain}\{username}")}",
RegexOptions.Singleline | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase |
RegexOptions.Compiled);
}
 
public URLACL(string URL, string username, string domain, int timeout) : this(URL, username, domain)
{
this.timeout = timeout;
}
 
public bool IsReserved
public bool isReserved
{
get
{
@@ -63,7 +58,7 @@
 
checkProcess.Start();
checkProcess.BeginOutputReadLine();
checkProcess.WaitForExit(timeout);
checkProcess.WaitForExit(60000);
 
return URLReservationRegex.IsMatch(netSHOutput.ToString());
}
@@ -122,9 +117,5 @@
 
return process.WaitForExit(timeout);
}
 
public void Dispose()
{
}
}
}
/wasSharpNET.csproj
@@ -32,7 +32,6 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Caching" />
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceProcess" />
@@ -49,7 +48,6 @@
<Compile Include="Cryptography\AES.cs" />
<Compile Include="Cryptography\SHA1.cs" />
<Compile Include="Diagnostics\ExceptionExtensions.cs" />
<Compile Include="IO\FileSystemWatcher.cs" />
<Compile Include="IO\SafeFileStream.cs" />
<Compile Include="IO\Utilities\IOExtensions.cs" />
<Compile Include="Network\HTTP\HTTPServer.cs" />