Browse Source

SMBServer / NTFileSystemAdapter: Renamed event from OnLogEntry to LogEntryAdded

Tal Aloni 7 years ago
parent
commit
1b024acf65

+ 2 - 2
SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs

@@ -18,7 +18,7 @@ namespace SMBLibrary
 
         private IFileSystem m_fileSystem;
 
-        public event EventHandler<LogEntry> OnLogEntry;
+        public event EventHandler<LogEntry> LogEntryAdded;
 
         public NTFileSystemAdapter(IFileSystem fileSystem)
         {
@@ -377,7 +377,7 @@ namespace SMBLibrary
         public void Log(Severity severity, string message)
         {
             // To be thread-safe we must capture the delegate reference first
-            EventHandler<LogEntry> handler = OnLogEntry;
+            EventHandler<LogEntry> handler = LogEntryAdded;
             if (handler != null)
             {
                 handler(this, new LogEntry(DateTime.Now, severity, "NT FileSystem Adapter", message));

+ 2 - 2
SMBLibrary/Server/SMBServer.cs

@@ -40,7 +40,7 @@ namespace SMBLibrary.Server
         private bool m_listening;
         private DateTime m_serverStartTime;
 
-        public event EventHandler<LogEntry> OnLogEntry;
+        public event EventHandler<LogEntry> LogEntryAdded;
 
         public SMBServer(SMBShareCollection shares, GSSProvider securityProvider)
         {
@@ -375,7 +375,7 @@ namespace SMBLibrary.Server
         private void Log(Severity severity, string message)
         {
             // To be thread-safe we must capture the delegate reference first
-            EventHandler<LogEntry> handler = OnLogEntry;
+            EventHandler<LogEntry> handler = LogEntryAdded;
             if (handler != null)
             {
                 handler(this, new LogEntry(DateTime.Now, severity, "SMB Server", message));

+ 1 - 1
SMBServer/LogWriter.cs

@@ -90,7 +90,7 @@ namespace SMBServer
             }
         }
 
-        public void OnLogEntry(object sender, LogEntry entry)
+        public void OnLogEntryAdded(object sender, LogEntry entry)
         {
             if (entry.Severity != Severity.Trace)
             {

+ 1 - 1
SMBServer/ServerUI.cs

@@ -99,7 +99,7 @@ namespace SMBServer
             GSSProvider securityProvider = new GSSProvider(authenticationMechanism);
             m_server = new SMBLibrary.Server.SMBServer(shares, securityProvider);
             m_logWriter = new LogWriter();
-            m_server.OnLogEntry += new EventHandler<LogEntry>(m_logWriter.OnLogEntry);
+            m_server.LogEntryAdded += new EventHandler<LogEntry>(m_logWriter.OnLogEntryAdded);
 
             try
             {