From b5db0ac4b8c0fb0ec26e77404a21e0cb309de2a5 Mon Sep 17 00:00:00 2001 From: Tal Aloni Date: Thu, 22 Jun 2017 17:55:15 +0300 Subject: [PATCH] FileSystemShare: Renamed event from OnAccessRequest to AccessRequested --- SMBLibrary/Server/Shares/FileSystemShare.cs | 4 ++-- SMBServer/ServerUI.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SMBLibrary/Server/Shares/FileSystemShare.cs b/SMBLibrary/Server/Shares/FileSystemShare.cs index d6ac136..c15cad6 100644 --- a/SMBLibrary/Server/Shares/FileSystemShare.cs +++ b/SMBLibrary/Server/Shares/FileSystemShare.cs @@ -37,7 +37,7 @@ namespace SMBLibrary.Server private string m_name; private INTFileStore m_fileSystem; - public event EventHandler OnAccessRequest; + public event EventHandler AccessRequested; public FileSystemShare(string shareName, INTFileStore fileSystem) { @@ -64,7 +64,7 @@ namespace SMBLibrary.Server public bool HasAccess(SecurityContext securityContext, string path, FileAccess requestedAccess) { // To be thread-safe we must capture the delegate reference first - EventHandler handler = OnAccessRequest; + EventHandler handler = AccessRequested; if (handler != null) { AccessRequestArgs args = new AccessRequestArgs(securityContext.UserName, path, requestedAccess, securityContext.MachineName, securityContext.ClientEndPoint); diff --git a/SMBServer/ServerUI.cs b/SMBServer/ServerUI.cs index 5c8e2e2..7792fc3 100644 --- a/SMBServer/ServerUI.cs +++ b/SMBServer/ServerUI.cs @@ -168,7 +168,7 @@ namespace SMBServer XmlNode writeAccessNode = shareNode.SelectSingleNode("WriteAccess"); List writeAccess = ReadAccessList(writeAccessNode); FileSystemShare share = new FileSystemShare(shareName, new DirectoryFileSystem(sharePath)); - share.OnAccessRequest += delegate(object sender, AccessRequestArgs args) + share.AccessRequested += delegate(object sender, AccessRequestArgs args) { bool hasReadAccess = Contains(readAccess, "Users") || Contains(readAccess, args.UserName); bool hasWriteAccess = Contains(writeAccess, "Users") || Contains(writeAccess, args.UserName);