This is an automated email from the ASF dual-hosted git repository.

freeandnil pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d73200d #245 fix code style to match .editorconfig
0d73200d is described below

commit 0d73200dbbdc279b6d0393197ce2e799d6149f2c
Author: Jan Friedrich <[email protected]>
AuthorDate: Mon May 19 17:10:25 2025 +0200

    #245 fix code style to match .editorconfig
---
 src/log4net.Tests/Signing.cs                       |  6 ++--
 src/log4net/Appender/BufferingAppenderSkeleton.cs  | 11 ++-----
 src/log4net/Appender/EventLogAppender.cs           |  5 +---
 src/log4net/Appender/LocalSyslogAppender.cs        |  5 +---
 .../Appender/ManagedColoredConsoleAppender.cs      |  5 +---
 src/log4net/Appender/RemoteSyslogAppender.cs       |  5 +---
 src/log4net/Config/BasicConfigurator.cs            |  5 +---
 .../Config/Log4NetConfigurationSectionHandler.cs   |  5 +---
 src/log4net/Core/SecurityContextProvider.cs        |  5 +---
 src/log4net/Filter/DenyAllFilter.cs                |  5 +---
 src/log4net/Layout/RawLayoutConverter.cs           |  6 ++--
 src/log4net/MDC.cs                                 | 20 +++----------
 src/log4net/NDC.cs                                 | 35 +++++-----------------
 src/log4net/Plugin/PluginSkeleton.cs               |  5 +---
 src/log4net/Util/EmptyCollection.cs                |  5 +---
 src/log4net/Util/GlobalContextProperties.cs        |  5 +---
 src/log4net/Util/LogLog.cs                         |  5 +---
 src/log4net/Util/LogicalThreadContextProperties.cs | 14 ++++-----
 src/log4net/Util/NativeError.cs                    |  5 +---
 src/log4net/Util/NullSecurityContext.cs            |  5 +---
 src/log4net/Util/OnlyOnceErrorHandler.cs           | 10 ++-----
 src/log4net/Util/PropertyEntry.cs                  |  5 +---
 src/log4net/Util/ProtectCloseTextWriter.cs         |  5 +---
 src/log4net/Util/ReaderWriterLock.cs               | 10 ++-----
 24 files changed, 43 insertions(+), 149 deletions(-)

diff --git a/src/log4net.Tests/Signing.cs b/src/log4net.Tests/Signing.cs
index 565b447c..1a71db12 100644
--- a/src/log4net.Tests/Signing.cs
+++ b/src/log4net.Tests/Signing.cs
@@ -28,10 +28,8 @@ public class Signing
   [Test]
   public void AssemblyShouldBeSigned()
   {
-    // Arrange
-    var asm = typeof(LoggerRepositorySkeleton).Assembly;
-    // Act
-    var result = asm.GetName().GetPublicKey();
+    System.Reflection.Assembly assembly = 
typeof(LoggerRepositorySkeleton).Assembly;
+    byte[]? result = assembly.GetName().GetPublicKey();
     Assert.That(result, Is.Not.Null);
     Assert.That(result, Is.Not.Empty);
   }
diff --git a/src/log4net/Appender/BufferingAppenderSkeleton.cs 
b/src/log4net/Appender/BufferingAppenderSkeleton.cs
index f98efbc2..c4b2ad8c 100644
--- a/src/log4net/Appender/BufferingAppenderSkeleton.cs
+++ b/src/log4net/Appender/BufferingAppenderSkeleton.cs
@@ -221,10 +221,7 @@ public override bool Flush(int millisecondsTimeout)
   /// of the buffer will NOT be flushed to the appender.
   /// </para>
   /// </remarks>
-  public virtual void Flush()
-  {
-    Flush(false);
-  }
+  public virtual void Flush() => Flush(false);
 
   /// <summary>
   /// Flush the currently buffered events
@@ -345,11 +342,7 @@ public override void ActivateOptions()
   /// the buffer must be sent when the appender is closed.
   /// </para>
   /// </remarks>
-  protected override void OnClose()
-  {
-    // Flush the buffer on close
-    Flush(true);
-  }
+  protected override void OnClose() => Flush(true); // Flush the buffer on 
close
 
   /// <summary>
   /// This method is called by the <see 
cref="AppenderSkeleton.DoAppend(LoggingEvent)"/> method. 
diff --git a/src/log4net/Appender/EventLogAppender.cs 
b/src/log4net/Appender/EventLogAppender.cs
index 8b96c3f5..8a8bfa8c 100644
--- a/src/log4net/Appender/EventLogAppender.cs
+++ b/src/log4net/Appender/EventLogAppender.cs
@@ -152,10 +152,7 @@ public EventLogAppender()
   /// Each mapping defines the event log entry type for a level.
   /// </para>
   /// </remarks>
-  public void AddMapping(Level2EventLogEntryType mapping)
-  {
-    _levelMapping.Add(mapping);
-  }
+  public void AddMapping(Level2EventLogEntryType mapping) => 
_levelMapping.Add(mapping);
 
   /// <summary>
   /// Gets or sets the <see cref="SecurityContext"/> used to write to the 
EventLog.
diff --git a/src/log4net/Appender/LocalSyslogAppender.cs 
b/src/log4net/Appender/LocalSyslogAppender.cs
index 6e6ead8d..1cd66330 100644
--- a/src/log4net/Appender/LocalSyslogAppender.cs
+++ b/src/log4net/Appender/LocalSyslogAppender.cs
@@ -277,10 +277,7 @@ public enum SyslogFacility
   /// Adds a <see cref="LevelSeverity"/> to this appender.
   /// </para>
   /// </remarks>
-  public void AddMapping(LevelSeverity mapping)
-  {
-    _levelMapping.Add(mapping);
-  }
+  public void AddMapping(LevelSeverity mapping) => _levelMapping.Add(mapping);
 
   /// <summary>
   /// Initialize the appender based on the options set.
diff --git a/src/log4net/Appender/ManagedColoredConsoleAppender.cs 
b/src/log4net/Appender/ManagedColoredConsoleAppender.cs
index eeab8a9c..e35bb020 100644
--- a/src/log4net/Appender/ManagedColoredConsoleAppender.cs
+++ b/src/log4net/Appender/ManagedColoredConsoleAppender.cs
@@ -114,10 +114,7 @@ public virtual string Target
   /// for a level.
   /// </para>
   /// </remarks>
-  public void AddMapping(LevelColors mapping)
-  {
-    _levelMapping.Add(mapping);
-  }
+  public void AddMapping(LevelColors mapping) => _levelMapping.Add(mapping);
 
   /// <summary>
   /// Writes the event to the console.
diff --git a/src/log4net/Appender/RemoteSyslogAppender.cs 
b/src/log4net/Appender/RemoteSyslogAppender.cs
index 83661d6e..a111200e 100644
--- a/src/log4net/Appender/RemoteSyslogAppender.cs
+++ b/src/log4net/Appender/RemoteSyslogAppender.cs
@@ -302,10 +302,7 @@ public RemoteSyslogAppender()
   /// Add a <see cref="LevelSeverity"/> mapping to this appender.
   /// </para>
   /// </remarks>
-  public void AddMapping(LevelSeverity mapping)
-  {
-    _levelMapping.Add(mapping);
-  }
+  public void AddMapping(LevelSeverity mapping) => _levelMapping.Add(mapping);
 
   /// <summary>
   /// Writes the event to a remote syslog daemon.
diff --git a/src/log4net/Config/BasicConfigurator.cs 
b/src/log4net/Config/BasicConfigurator.cs
index e0db7169..6c035c48 100644
--- a/src/log4net/Config/BasicConfigurator.cs
+++ b/src/log4net/Config/BasicConfigurator.cs
@@ -73,10 +73,7 @@ public static class BasicConfigurator
   /// layout style.
   /// </para>
   /// </remarks>
-  public static ICollection Configure()
-  {
-    return Configure(LogManager.GetRepository(Assembly.GetCallingAssembly()));
-  }
+  public static ICollection Configure() => 
Configure(LogManager.GetRepository(Assembly.GetCallingAssembly()));
 
   /// <summary>
   /// Initializes the log4net system using the specified appenders.
diff --git a/src/log4net/Config/Log4NetConfigurationSectionHandler.cs 
b/src/log4net/Config/Log4NetConfigurationSectionHandler.cs
index 600b8463..63659cb8 100644
--- a/src/log4net/Config/Log4NetConfigurationSectionHandler.cs
+++ b/src/log4net/Config/Log4NetConfigurationSectionHandler.cs
@@ -71,8 +71,5 @@ public Log4NetConfigurationSectionHandler()
   /// Returns the <see cref="XmlNode"/> containing the configuration data,
   /// </para>
   /// </remarks>
-  public object Create(object parent, object configContext, XmlNode section)
-  {
-    return section;
-  }
+  public object Create(object parent, object configContext, XmlNode section) 
=> section;
 }
\ No newline at end of file
diff --git a/src/log4net/Core/SecurityContextProvider.cs 
b/src/log4net/Core/SecurityContextProvider.cs
index acd53903..9dbc9046 100644
--- a/src/log4net/Core/SecurityContextProvider.cs
+++ b/src/log4net/Core/SecurityContextProvider.cs
@@ -114,8 +114,5 @@ protected SecurityContextProvider()
   /// behavior.
   /// </para>
   /// </remarks>
-  public virtual SecurityContext CreateSecurityContext(object consumer)
-  {
-    return NullSecurityContext.Instance;
-  }
+  public virtual SecurityContext CreateSecurityContext(object consumer) => 
NullSecurityContext.Instance;
 }
diff --git a/src/log4net/Filter/DenyAllFilter.cs 
b/src/log4net/Filter/DenyAllFilter.cs
index 4445f18f..db6d380f 100644
--- a/src/log4net/Filter/DenyAllFilter.cs
+++ b/src/log4net/Filter/DenyAllFilter.cs
@@ -50,8 +50,5 @@ public sealed class DenyAllFilter : FilterSkeleton
   /// as any further filters will be ignored!
   /// </para>
   /// </remarks>
-  public override FilterDecision Decide(LoggingEvent loggingEvent)
-  {
-    return FilterDecision.Deny;
-  }
+  public override FilterDecision Decide(LoggingEvent loggingEvent) => 
FilterDecision.Deny;
 }
diff --git a/src/log4net/Layout/RawLayoutConverter.cs 
b/src/log4net/Layout/RawLayoutConverter.cs
index 84e66624..df61ce3a 100644
--- a/src/log4net/Layout/RawLayoutConverter.cs
+++ b/src/log4net/Layout/RawLayoutConverter.cs
@@ -48,11 +48,9 @@ public class RawLayoutConverter : IConvertFrom
   /// as the <paramref name="sourceType"/>.
   /// </para>
   /// </remarks>
-  public bool CanConvertFrom(Type sourceType)
-  {
+  public bool CanConvertFrom(Type sourceType) =>
     // Accept an ILayout object
-    return typeof(ILayout).IsAssignableFrom(sourceType);
-  }
+    typeof(ILayout).IsAssignableFrom(sourceType);
 
   /// <summary>
   /// Converts the value to a <see cref="IRawLayout"/> object.
diff --git a/src/log4net/MDC.cs b/src/log4net/MDC.cs
index 2660a05d..ba27661b 100644
--- a/src/log4net/MDC.cs
+++ b/src/log4net/MDC.cs
@@ -65,10 +65,7 @@ public static class MDC
   /// </para>
   /// </remarks>
   /*[Obsolete("MDC has been replaced by ThreadContext.Properties")]*/
-  public static string? Get(string key)
-  {
-    return ThreadContext.Properties[key]?.ToString();
-  }
+  public static string? Get(string key) => 
ThreadContext.Properties[key]?.ToString();
 
   /// <summary>
   /// Add an entry to the MDC
@@ -94,10 +91,7 @@ public static class MDC
   /// </para>
   /// </remarks>
   /*[Obsolete("MDC has been replaced by ThreadContext.Properties")]*/
-  public static void Set(string key, string value)
-  {
-    ThreadContext.Properties[key] = value;
-  }
+  public static void Set(string key, string value) => 
ThreadContext.Properties[key] = value;
 
   /// <summary>
   /// Removes the key value mapping for the key specified.
@@ -115,10 +109,7 @@ public static void Set(string key, string value)
   /// </para>
   /// </remarks>
   /*[Obsolete("MDC has been replaced by ThreadContext.Properties")]*/
-  public static void Remove(string key)
-  {
-    ThreadContext.Properties.Remove(key);
-  }
+  public static void Remove(string key) => 
ThreadContext.Properties.Remove(key);
 
   /// <summary>
   /// Clear all entries in the MDC
@@ -135,8 +126,5 @@ public static void Remove(string key)
   /// </para>
   /// </remarks>
   /*[Obsolete("MDC has been replaced by ThreadContext.Properties")]*/
-  public static void Clear()
-  {
-    ThreadContext.Properties.Clear();
-  }
+  public static void Clear() => ThreadContext.Properties.Clear();
 }
diff --git a/src/log4net/NDC.cs b/src/log4net/NDC.cs
index 2c87e5e3..ccc1502a 100644
--- a/src/log4net/NDC.cs
+++ b/src/log4net/NDC.cs
@@ -85,10 +85,7 @@ public static class NDC
   /// </remarks>
   /// <seealso cref="SetMaxDepth"/>
   /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/
-  public static int Depth
-  {
-    get { return ThreadContext.Stacks["NDC"].Count; }
-  }
+  public static int Depth => ThreadContext.Stacks["NDC"].Count;
 
   /// <summary>
   /// Clears all the contextual information held on the current thread.
@@ -105,10 +102,7 @@ public static int Depth
   /// </para>
   /// </remarks>
   /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/
-  public static void Clear()
-  {
-    ThreadContext.Stacks["NDC"].Clear();
-  }
+  public static void Clear() => ThreadContext.Stacks["NDC"].Clear();
 
   /// <summary>
   /// Creates a clone of the stack of context information.
@@ -128,10 +122,7 @@ public static void Clear()
   /// </para>
   /// </remarks>
   /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/
-  public static Stack CloneStack()
-  {
-    return ThreadContext.Stacks["NDC"].InternalStack;
-  }
+  public static Stack CloneStack() => 
ThreadContext.Stacks["NDC"].InternalStack;
 
   /// <summary>
   /// Inherits the contextual information from another thread.
@@ -155,10 +146,7 @@ public static Stack CloneStack()
   /// </para>
   /// </remarks>
   /*[Obsolete("NDC has been replaced by ThreadContext.Stacks", true)]*/
-  public static void Inherit(Stack stack)
-  {
-    ThreadContext.Stacks["NDC"].InternalStack = stack;
-  }
+  public static void Inherit(Stack stack) => 
ThreadContext.Stacks["NDC"].InternalStack = stack;
 
   /// <summary>
   /// Removes the top context from the stack.
@@ -181,10 +169,7 @@ public static void Inherit(Stack stack)
   /// </para>
   /// </remarks>
   /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/
-  public static string? Pop()
-  {
-    return ThreadContext.Stacks["NDC"].Pop();
-  }
+  public static string? Pop() => ThreadContext.Stacks["NDC"].Pop();
 
   /// <summary>
   /// Pushes a new context message.
@@ -217,10 +202,7 @@ public static void Inherit(Stack stack)
   /// </code>
   /// </example>
   /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/
-  public static IDisposable Push(string message)
-  {
-    return ThreadContext.Stacks["NDC"].Push(message);
-  }
+  public static IDisposable Push(string message) => 
ThreadContext.Stacks["NDC"].Push(message);
 
   /// <summary>
   /// Pushes a new context message.
@@ -255,10 +237,7 @@ public static IDisposable Push(string message)
   /// </code>
   /// </example>
   /*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/
-  public static IDisposable PushFormat(string messageFormat, params object[] 
args)
-  {
-    return Push(string.Format(messageFormat, args));
-  }
+  public static IDisposable PushFormat(string messageFormat, params object[] 
args) => Push(string.Format(messageFormat, args));
 
   /// <summary>
   /// Removes the context information for this thread. It is
diff --git a/src/log4net/Plugin/PluginSkeleton.cs 
b/src/log4net/Plugin/PluginSkeleton.cs
index 9e6f9261..8b17af17 100644
--- a/src/log4net/Plugin/PluginSkeleton.cs
+++ b/src/log4net/Plugin/PluginSkeleton.cs
@@ -78,10 +78,7 @@ protected PluginSkeleton(string name)
   /// This method is called when the plugin is attached to the repository.
   /// </para>
   /// </remarks>
-  public virtual void Attach(ILoggerRepository repository)
-  {
-    LoggerRepository = repository;
-  }
+  public virtual void Attach(ILoggerRepository repository) => LoggerRepository 
= repository;
 
   /// <summary>
   /// Is called when the plugin is to shutdown.
diff --git a/src/log4net/Util/EmptyCollection.cs 
b/src/log4net/Util/EmptyCollection.cs
index 84b83167..a5424c1e 100644
--- a/src/log4net/Util/EmptyCollection.cs
+++ b/src/log4net/Util/EmptyCollection.cs
@@ -131,8 +131,5 @@ public void CopyTo(Array array, int index)
   /// As the collection is empty a <see cref="NullEnumerator"/> is returned.
   /// </para>
   /// </remarks>
-  public IEnumerator GetEnumerator()
-  {
-    return NullEnumerator.Instance;
-  }
+  public IEnumerator GetEnumerator() => NullEnumerator.Instance;
 }
diff --git a/src/log4net/Util/GlobalContextProperties.cs 
b/src/log4net/Util/GlobalContextProperties.cs
index 7c7ba118..efdd59eb 100644
--- a/src/log4net/Util/GlobalContextProperties.cs
+++ b/src/log4net/Util/GlobalContextProperties.cs
@@ -136,8 +136,5 @@ public void Clear()
   /// stores a readonly copy of the properties.
   /// </para>
   /// </remarks>
-  internal ReadOnlyPropertiesDictionary GetReadOnlyProperties()
-  {
-    return _readOnlyProperties;
-  }
+  internal ReadOnlyPropertiesDictionary GetReadOnlyProperties() => 
_readOnlyProperties;
 }
diff --git a/src/log4net/Util/LogLog.cs b/src/log4net/Util/LogLog.cs
index 98a4a359..f5f3c607 100644
--- a/src/log4net/Util/LogLog.cs
+++ b/src/log4net/Util/LogLog.cs
@@ -234,10 +234,7 @@ static LogLog()
   /// <param name="prefix"></param>
   /// <param name="message"></param>
   /// <param name="exception"></param>
-  public static void OnLogReceived(Type source, string prefix, string message, 
Exception? exception)
-  {
-    LogReceived?.Invoke(null, new LogReceivedEventArgs(new LogLog(source, 
prefix, message, exception)));
-  }
+  public static void OnLogReceived(Type source, string prefix, string message, 
Exception? exception) => LogReceived?.Invoke(null, new LogReceivedEventArgs(new 
LogLog(source, prefix, message, exception)));
 
   /// <summary>
   /// Test if LogLog.Debug is enabled for output.
diff --git a/src/log4net/Util/LogicalThreadContextProperties.cs 
b/src/log4net/Util/LogicalThreadContextProperties.cs
index bb8b0eb6..b7ea8f4b 100644
--- a/src/log4net/Util/LogicalThreadContextProperties.cs
+++ b/src/log4net/Util/LogicalThreadContextProperties.cs
@@ -178,13 +178,12 @@ public void Clear()
   /// </remarks>
   [SecuritySafeCritical]
   private static PropertiesDictionary? GetLogicalProperties()
-  {
 #if NET462_OR_GREATER
-    return CallContext.LogicalGetData(CSlotName) as PropertiesDictionary;
+    => CallContext.LogicalGetData(CSlotName) as PropertiesDictionary;
 #else
-    return _asyncLocalDictionary.Value;
+    => _asyncLocalDictionary.Value;
 #endif
-  }
+
 
   /// <summary>
   /// Sets the call context data.
@@ -196,13 +195,12 @@ public void Clear()
   /// </remarks>
   [SecuritySafeCritical]
   private static void SetLogicalProperties(PropertiesDictionary properties)
-  {
 #if NET462_OR_GREATER
-    CallContext.LogicalSetData(CSlotName, properties);
+    => CallContext.LogicalSetData(CSlotName, properties);
 #else
-    _asyncLocalDictionary.Value = properties;
+    => _asyncLocalDictionary.Value = properties;
 #endif
-  }
+
 
   /// <summary>
   /// The fully qualified type of the LogicalThreadContextProperties class.
diff --git a/src/log4net/Util/NativeError.cs b/src/log4net/Util/NativeError.cs
index 687a3e8e..6bc6a214 100644
--- a/src/log4net/Util/NativeError.cs
+++ b/src/log4net/Util/NativeError.cs
@@ -94,10 +94,7 @@ public static NativeError GetLastError()
   /// native Win32 <c>FormatMessage</c> function.
   /// </para>
   /// </remarks>
-  public static NativeError GetError(int number)
-  {
-    return new NativeError(number, GetErrorMessage(number));
-  }
+  public static NativeError GetError(int number) => new NativeError(number, 
GetErrorMessage(number));
 
   /// <summary>
   /// Retrieves the message corresponding with a Win32 message identifier.
diff --git a/src/log4net/Util/NullSecurityContext.cs 
b/src/log4net/Util/NullSecurityContext.cs
index 760de9f3..5a1c239b 100644
--- a/src/log4net/Util/NullSecurityContext.cs
+++ b/src/log4net/Util/NullSecurityContext.cs
@@ -68,8 +68,5 @@ private NullSecurityContext()
   /// No impersonation is done and <c>null</c> is always returned.
   /// </para>
   /// </remarks>
-  public override IDisposable? Impersonate(object state)
-  {
-    return null;
-  }
+  public override IDisposable? Impersonate(object state) => null;
 }
diff --git a/src/log4net/Util/OnlyOnceErrorHandler.cs 
b/src/log4net/Util/OnlyOnceErrorHandler.cs
index 2eeef658..395a1805 100644
--- a/src/log4net/Util/OnlyOnceErrorHandler.cs
+++ b/src/log4net/Util/OnlyOnceErrorHandler.cs
@@ -130,10 +130,7 @@ public virtual void FirstError(string message, Exception? 
e, ErrorCode errorCode
   /// Invokes <see cref="FirstError"/> if and only if this is the first error 
or the first error after <see cref="Reset"/> has been called.
   /// </para>
   /// </remarks>
-  public void Error(string message, Exception e)
-  {
-    Error(message, e, ErrorCode.GenericFailure);
-  }
+  public void Error(string message, Exception e) => Error(message, e, 
ErrorCode.GenericFailure);
 
   /// <summary>
   /// Log an error
@@ -144,10 +141,7 @@ public void Error(string message, Exception e)
   /// Invokes <see cref="FirstError"/> if and only if this is the first error 
or the first error after <see cref="Reset"/> has been called.
   /// </para>
   /// </remarks>
-  public void Error(string message)
-  {
-    Error(message, null, ErrorCode.GenericFailure);
-  }
+  public void Error(string message) => Error(message, null, 
ErrorCode.GenericFailure);
 
   /// <summary>
   /// Is error logging enabled
diff --git a/src/log4net/Util/PropertyEntry.cs 
b/src/log4net/Util/PropertyEntry.cs
index b5b2cfc5..7b1ebcbb 100644
--- a/src/log4net/Util/PropertyEntry.cs
+++ b/src/log4net/Util/PropertyEntry.cs
@@ -40,8 +40,5 @@ public class PropertyEntry
   /// Override <c>Object.ToString</c> to return sensible debug info
   /// </summary>
   /// <returns>string info about this object</returns>
-  public override string ToString()
-  {
-    return $"PropertyEntry(Key={Key}, Value={Value})";
-  }
+  public override string ToString() => $"PropertyEntry(Key={Key}, 
Value={Value})";
 }
diff --git a/src/log4net/Util/ProtectCloseTextWriter.cs 
b/src/log4net/Util/ProtectCloseTextWriter.cs
index 08b9722d..e25c825c 100644
--- a/src/log4net/Util/ProtectCloseTextWriter.cs
+++ b/src/log4net/Util/ProtectCloseTextWriter.cs
@@ -46,10 +46,7 @@ public ProtectCloseTextWriter(TextWriter writer) : 
base(writer)
   /// Attaches this instance to a different underlying <see 
cref="TextWriter"/>.
   /// </summary>
   /// <param name="writer">the writer to attach to</param>
-  public void Attach(TextWriter writer)
-  {
-    Writer = writer;
-  }
+  public void Attach(TextWriter writer) => Writer = writer;
 
   /// <summary>
   /// Does not close the underlying output writer.
diff --git a/src/log4net/Util/ReaderWriterLock.cs 
b/src/log4net/Util/ReaderWriterLock.cs
index 6060ad85..75d5ba44 100644
--- a/src/log4net/Util/ReaderWriterLock.cs
+++ b/src/log4net/Util/ReaderWriterLock.cs
@@ -70,10 +70,7 @@ public void AcquireReaderLock()
   /// reaches zero, the lock is released.
   /// </para>
   /// </remarks>
-  public void ReleaseReaderLock()
-  {
-    _readerWriterLock.ExitReadLock();
-  }
+  public void ReleaseReaderLock() => _readerWriterLock.ExitReadLock();
 
   /// <summary>
   /// Acquires the writer lock
@@ -102,10 +99,7 @@ public void AcquireWriterLock()
   /// When the count reaches zero, the writer lock is released.
   /// </para>
   /// </remarks>
-  public void ReleaseWriterLock()
-  {
-    _readerWriterLock.ExitWriteLock();
-  }
+  public void ReleaseWriterLock() => _readerWriterLock.ExitWriteLock();
 
   private readonly ReaderWriterLockSlim _readerWriterLock = 
new(LockRecursionPolicy.SupportsRecursion);
 }

Reply via email to