From c4fa4a9f154b9dfa8be5e52898e9009fc7f85478 Mon Sep 17 00:00:00 2001 From: Tal Aloni Date: Sat, 26 Aug 2017 17:06:01 +0300 Subject: [PATCH] Minor code refactoring: Moved AccessRequestArgs class to a separate file --- SMBLibrary/SMBLibrary.csproj | 1 + SMBLibrary/Server/Shares/AccessRequestArgs.cs | 32 +++++++++++++++++++ SMBLibrary/Server/Shares/FileSystemShare.cs | 21 ------------ 3 files changed, 33 insertions(+), 21 deletions(-) create mode 100644 SMBLibrary/Server/Shares/AccessRequestArgs.cs diff --git a/SMBLibrary/SMBLibrary.csproj b/SMBLibrary/SMBLibrary.csproj index 9a15d62..b8f4888 100644 --- a/SMBLibrary/SMBLibrary.csproj +++ b/SMBLibrary/SMBLibrary.csproj @@ -201,6 +201,7 @@ + diff --git a/SMBLibrary/Server/Shares/AccessRequestArgs.cs b/SMBLibrary/Server/Shares/AccessRequestArgs.cs new file mode 100644 index 0000000..201ecab --- /dev/null +++ b/SMBLibrary/Server/Shares/AccessRequestArgs.cs @@ -0,0 +1,32 @@ +/* Copyright (C) 2017 Tal Aloni . 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; + } + } +} diff --git a/SMBLibrary/Server/Shares/FileSystemShare.cs b/SMBLibrary/Server/Shares/FileSystemShare.cs index c15cad6..f141625 100644 --- a/SMBLibrary/Server/Shares/FileSystemShare.cs +++ b/SMBLibrary/Server/Shares/FileSystemShare.cs @@ -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;