Minor code refactoring: Moved AccessRequestArgs class to a separate file

This commit is contained in:
Tal Aloni 2017-08-26 17:06:01 +03:00
parent 59b4e46bc0
commit c4fa4a9f15
3 changed files with 33 additions and 21 deletions

View file

@ -201,6 +201,7 @@
<Compile Include="Server\Helpers\ServerPathUtils.cs" />
<Compile Include="Server\NameServer.cs" />
<Compile Include="Server\SessionInformation.cs" />
<Compile Include="Server\Shares\AccessRequestArgs.cs" />
<Compile Include="Server\Shares\FileSystemShare.cs" />
<Compile Include="Server\Shares\ISMBShare.cs" />
<Compile Include="Server\Shares\NamedPipeShare.cs" />

View file

@ -0,0 +1,32 @@
/* Copyright (C) 2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
*
* You can redistribute this program and/or modify it under the terms of
* the GNU Lesser Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
namespace SMBLibrary.Server
{
public class AccessRequestArgs : EventArgs
{
public string UserName;
public string Path;
public FileAccess RequestedAccess;
public string MachineName;
public IPEndPoint ClientEndPoint;
public bool Allow = true;
public AccessRequestArgs(string userName, string path, FileAccess requestedAccess, string machineName, IPEndPoint clientEndPoint)
{
UserName = userName;
Path = path;
RequestedAccess = requestedAccess;
MachineName = machineName;
ClientEndPoint = clientEndPoint;
}
}
}

View file

@ -7,31 +7,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using Utilities;
namespace SMBLibrary.Server
{
public class AccessRequestArgs : EventArgs
{
public string UserName;
public string Path;
public FileAccess RequestedAccess;
public string MachineName;
public IPEndPoint ClientEndPoint;
public bool Allow = true;
public AccessRequestArgs(string userName, string path, FileAccess requestedAccess, string machineName, IPEndPoint clientEndPoint)
{
UserName = userName;
Path = path;
RequestedAccess = requestedAccess;
MachineName = machineName;
ClientEndPoint = clientEndPoint;
}
}
public class FileSystemShare : ISMBShare
{
private string m_name;