You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by fr...@apache.org on 2026/02/20 14:56:17 UTC
(logging-log4net) 01/01: #281 fix hints and warnings
This is an automated email from the ASF dual-hosted git repository.
freeandnil pushed a commit to branch Feature/#281-fix-hints-and-warnings
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
commit e103e942641dd51f8fb9bbe7826b571629a56065
Author: Jan Friedrich <fr...@apache.org>
AuthorDate: Fri Feb 20 15:55:53 2026 +0100
#281 fix hints and warnings
---
src/log4net/Appender/AdoNetAppender.cs | 12 +--
src/log4net/Appender/AppenderSkeleton.cs | 22 ++---
src/log4net/Appender/BufferingAppenderSkeleton.cs | 24 ++---
.../Appender/BufferingForwardingAppender.cs | 2 +-
src/log4net/Appender/DebugAppender.cs | 6 +-
src/log4net/Appender/EventLogAppender.cs | 16 ++--
src/log4net/Appender/ForwardingAppender.cs | 2 +-
src/log4net/Appender/IFlushable.cs | 2 +-
src/log4net/Appender/RollingFileAppender.cs | 10 +-
src/log4net/Appender/SmtpAppender.cs | 4 +-
src/log4net/Appender/TextWriterAppender.cs | 6 +-
src/log4net/Appender/TraceAppender.cs | 4 +-
src/log4net/Config/XmlConfiguratorAttribute.cs | 8 +-
src/log4net/Core/DefaultRepositorySelector.cs | 6 +-
src/log4net/Core/ExceptionEvaluator.cs | 4 +-
src/log4net/Core/IAppenderAttachable.cs | 6 +-
src/log4net/Core/ILogger.cs | 4 +-
src/log4net/Core/IRepositorySelector.cs | 2 +-
src/log4net/Core/ITriggeringEventEvaluator.cs | 4 +-
src/log4net/Core/LevelCollection.cs | 90 +++++++++---------
src/log4net/Core/LevelEvaluator.cs | 4 +-
src/log4net/Core/LevelMap.cs | 2 +-
src/log4net/Core/LocationInfo.cs | 2 +-
src/log4net/Core/LogImpl.cs | 24 ++---
src/log4net/Core/LoggerManager.cs | 16 ++--
src/log4net/Core/LoggerWrapperImpl.cs | 2 +-
src/log4net/Core/SecurityContext.cs | 2 +-
src/log4net/Core/TimeEvaluator.cs | 4 +-
src/log4net/Filter/FilterSkeleton.cs | 2 +-
src/log4net/Filter/LevelMatchFilter.cs | 4 +-
src/log4net/Filter/LevelRangeFilter.cs | 4 +-
src/log4net/Filter/LoggerMatchFilter.cs | 6 +-
src/log4net/Filter/StringMatchFilter.cs | 2 +-
src/log4net/GlobalContext.cs | 2 +-
src/log4net/ILog.cs | 10 +-
src/log4net/Layout/ILayout.cs | 6 +-
src/log4net/Layout/LayoutSkeleton.cs | 10 +-
.../Layout/Pattern/PatternLayoutConverter.cs | 8 +-
.../Layout/Pattern/PropertyPatternConverter.cs | 4 +-
src/log4net/Layout/RawLayoutConverter.cs | 2 +-
src/log4net/Layout/RawPropertyLayout.cs | 2 +-
src/log4net/Layout/XmlLayoutBase.cs | 8 +-
src/log4net/LogManager.cs | 28 +++---
src/log4net/LogicalThreadContext.cs | 6 +-
src/log4net/MDC.cs | 6 +-
src/log4net/NDC.cs | 10 +-
src/log4net/ObjectRenderer/DefaultRenderer.cs | 2 +-
src/log4net/ObjectRenderer/RendererMap.cs | 4 +-
src/log4net/Plugin/PluginCollection.cs | 102 ++++++++++-----------
src/log4net/Plugin/PluginMap.cs | 2 +-
.../Repository/Hierarchy/DefaultLoggerFactory.cs | 2 +-
src/log4net/Repository/Hierarchy/ILoggerFactory.cs | 2 +-
src/log4net/Repository/Hierarchy/RootLogger.cs | 6 +-
.../Hierarchy/XmlHierarchyConfigurator.cs | 10 +-
src/log4net/Repository/ILoggerRepository.cs | 4 +-
src/log4net/Repository/LoggerRepositorySkeleton.cs | 4 +-
src/log4net/ThreadContext.cs | 6 +-
src/log4net/Util/AppenderAttachedImpl.cs | 4 +-
src/log4net/Util/CompositeProperties.cs | 2 +-
src/log4net/Util/CyclicBuffer.cs | 6 +-
src/log4net/Util/EmptyCollection.cs | 2 +-
src/log4net/Util/EmptyDictionary.cs | 16 ++--
src/log4net/Util/GlobalContextProperties.cs | 6 +-
src/log4net/Util/LogLog.cs | 26 +++---
src/log4net/Util/LogicalThreadContextProperties.cs | 2 +-
src/log4net/Util/LogicalThreadContextStack.cs | 4 +-
src/log4net/Util/NativeError.cs | 2 +-
src/log4net/Util/NullDictionaryEnumerator.cs | 4 +-
src/log4net/Util/NullEnumerator.cs | 4 +-
src/log4net/Util/NullSecurityContext.cs | 4 +-
src/log4net/Util/OptionConverter.cs | 10 +-
src/log4net/Util/PatternParser.cs | 4 +-
src/log4net/Util/PatternString.cs | 2 +-
.../AppSettingPatternConverter.cs | 2 +-
.../PropertyPatternConverter.cs | 2 +-
src/log4net/Util/PropertiesDictionary.cs | 4 +-
src/log4net/Util/QuietTextWriter.cs | 2 +-
src/log4net/Util/ReaderWriterLock.cs | 4 +-
src/log4net/Util/SystemInfo.cs | 40 ++++----
src/log4net/Util/SystemStringFormat.cs | 2 +-
src/log4net/Util/ThreadContextStack.cs | 4 +-
.../Util/TypeConverters/BooleanConverter.cs | 4 +-
.../Util/TypeConverters/ConverterRegistry.cs | 8 +-
.../Util/TypeConverters/EncodingConverter.cs | 2 +-
.../Util/TypeConverters/IPAddressConverter.cs | 2 +-
.../Util/TypeConverters/PatternLayoutConverter.cs | 2 +-
.../Util/TypeConverters/PatternStringConverter.cs | 4 +-
src/log4net/Util/TypeConverters/TypeConverter.cs | 2 +-
.../Util/TypeConverters/TypeConverterAttribute.cs | 2 +-
89 files changed, 369 insertions(+), 369 deletions(-)
diff --git a/src/log4net/Appender/AdoNetAppender.cs b/src/log4net/Appender/AdoNetAppender.cs
index f720dfdf..fa4d90cc 100644
--- a/src/log4net/Appender/AdoNetAppender.cs
+++ b/src/log4net/Appender/AdoNetAppender.cs
@@ -270,8 +270,8 @@ public AdoNetAppender()
/// Should transactions be used to insert logging events in the database.
/// </summary>
/// <value>
- /// <c>true</c> if transactions should be used to insert logging events in
- /// the database, otherwise <c>false</c>. The default value is <c>true</c>.
+ /// <see langword="true"/> if transactions should be used to insert logging events in
+ /// the database, otherwise <see langword="false"/>. The default value is <see langword="true"/>.
/// </value>
/// <remarks>
/// <para>
@@ -306,8 +306,8 @@ public AdoNetAppender()
/// Should this appender try to reconnect to the database on error.
/// </summary>
/// <value>
- /// <c>true</c> if the appender should try to reconnect to the database after an
- /// error has occurred, otherwise <c>false</c>. The default value is <c>false</c>,
+ /// <see langword="true"/> if the appender should try to reconnect to the database after an
+ /// error has occurred, otherwise <see langword="false"/>. The default value is <see langword="false"/>,
/// i.e. not to try to reconnect.
/// </value>
/// <remarks>
@@ -317,7 +317,7 @@ public AdoNetAppender()
/// </para>
/// <para>
/// To force the appender to attempt to reconnect to the database set this
- /// property to <c>true</c>.
+ /// property to <see langword="true"/>.
/// </para>
/// <note>
/// When the appender attempts to connect to the database there may be a
@@ -458,7 +458,7 @@ protected override void SendBuffer(LoggingEvent[] events)
/// <param name="events">The array of events to insert into the database.</param>
/// <remarks>
/// <para>
- /// The transaction argument can be <c>null</c> if the appender has been
+ /// The transaction argument can be <see langword="null"/> if the appender has been
/// configured not to use transactions. See <see cref="UseTransactions"/>
/// property for more information.
/// </para>
diff --git a/src/log4net/Appender/AppenderSkeleton.cs b/src/log4net/Appender/AppenderSkeleton.cs
index 474bac42..5e0052c2 100644
--- a/src/log4net/Appender/AppenderSkeleton.cs
+++ b/src/log4net/Appender/AppenderSkeleton.cs
@@ -59,7 +59,7 @@ public abstract class AppenderSkeleton : IAppender, IBulkAppender, IOptionHandle
/// </summary>
/// <remarks>
/// <para>
- /// If this appender has not been closed then the <c>Finalize</c> method
+ /// If this appender has not been closed then the <see cref="Finalize"/> method
/// will call <see cref="Close"/>.
/// </para>
/// </remarks>
@@ -236,7 +236,7 @@ public void Close()
/// <item>
/// <description>
/// Calls <see cref="PreAppendCheck()"/> and checks that
- /// it returns <c>true</c>.</description>
+ /// it returns <see langword="true"/>.</description>
/// </item>
/// </list>
/// </para>
@@ -318,7 +318,7 @@ public void DoAppend(LoggingEvent loggingEvent)
/// <item>
/// <description>
/// Calls <see cref="PreAppendCheck()"/> and checks that
- /// it returns <c>true</c>.</description>
+ /// it returns <see langword="true"/>.</description>
/// </item>
/// </list>
/// </para>
@@ -383,7 +383,7 @@ public void DoAppend(LoggingEvent[] loggingEvents)
/// Test if the logging event should we output by this appender
/// </summary>
/// <param name="loggingEvent">the event to test</param>
- /// <returns><c>true</c> if the event should be output, <c>false</c> if the event should be ignored</returns>
+ /// <returns><see langword="true"/> if the event should be output, <see langword="false"/> if the event should be ignored</returns>
/// <remarks>
/// <para>
/// This method checks the logging event against the threshold level set
@@ -482,8 +482,8 @@ public virtual void AddFilter(IFilter filter)
/// </summary>
/// <param name="level"><see cref="Level"/> to test against.</param>
/// <returns>
- /// <c>true</c> if the <paramref name="level"/> meets the <see cref="Threshold"/>
- /// requirements of this appender. A null level always maps to <c>true</c>,
+ /// <see langword="true"/> if the <paramref name="level"/> meets the <see cref="Threshold"/>
+ /// requirements of this appender. A null level always maps to <see langword="true"/>,
/// the equivalent of <see cref="Level.All"/>.
/// </returns>
protected virtual bool IsAsSevereAsThreshold(Level? level) => level is null || level >= Threshold;
@@ -587,7 +587,7 @@ protected virtual void Append(IEnumerable<LoggingEvent> loggingEvents)
/// this base class if it is overridden.
/// </para>
/// </remarks>
- /// <returns><c>true</c> if the call to <see cref="Append(LoggingEvent)"/> should proceed.</returns>
+ /// <returns><see langword="true"/> if the call to <see cref="Append(LoggingEvent)"/> should proceed.</returns>
protected virtual bool PreAppendCheck()
{
if ((Layout is null) && RequiresLayout)
@@ -698,14 +698,14 @@ protected void RenderLoggingEvent(TextWriter writer, LoggingEvent loggingEvent)
/// <para>
/// In the rather exceptional case, where the appender
/// implementation admits a layout but can also work without it,
- /// then the appender should return <c>true</c>.
+ /// then the appender should return <see langword="true"/>.
/// </para>
/// <para>
- /// This default implementation always returns <c>false</c>.
+ /// This default implementation always returns <see langword="false"/>.
/// </para>
/// </remarks>
/// <returns>
- /// <c>true</c> if the appender requires a layout object, otherwise <c>false</c>.
+ /// <see langword="true"/> if the appender requires a layout object, otherwise <see langword="false"/>.
/// </returns>
protected virtual bool RequiresLayout => false;
@@ -715,7 +715,7 @@ protected void RenderLoggingEvent(TextWriter writer, LoggingEvent loggingEvent)
/// <remarks>
/// This implementation doesn't flush anything and always returns true
/// </remarks>
- /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if all logging events were flushed successfully, else <see langword="false"/>.</returns>
public virtual bool Flush(int millisecondsTimeout) => true;
/// <summary>
diff --git a/src/log4net/Appender/BufferingAppenderSkeleton.cs b/src/log4net/Appender/BufferingAppenderSkeleton.cs
index c4b2ad8c..31fff5b9 100644
--- a/src/log4net/Appender/BufferingAppenderSkeleton.cs
+++ b/src/log4net/Appender/BufferingAppenderSkeleton.cs
@@ -56,7 +56,7 @@ namespace log4net.Appender;
/// The buffering appender can be configured in a <see cref="Lossy"/> mode.
/// By default the appender is NOT lossy. When the buffer is full all
/// the buffered events are sent with <see cref="SendBuffer(LoggingEvent[])"/>.
-/// If the <see cref="Lossy"/> property is set to <c>true</c> then the
+/// If the <see cref="Lossy"/> property is set to <see langword="true"/> then the
/// buffer will not be sent when it is full, and new events arriving
/// in the appender will overwrite the oldest event in the buffer.
/// In lossy mode the buffer will only be sent when the <see cref="Evaluator"/>
@@ -87,7 +87,7 @@ protected BufferingAppenderSkeleton() : this(true)
/// Initializes a new instance of the <see cref="BufferingAppenderSkeleton" /> class.
/// </summary>
/// <param name="eventMustBeFixed">the events passed through this appender must be
- /// fixed by the time that they arrive in the derived class' <c>SendBuffer</c> method.</param>
+ /// fixed by the time that they arrive in the derived class' <see cref="SendBuffer"/> method.</param>
/// <remarks>
/// <para>
/// Protected constructor to allow subclassing.
@@ -107,7 +107,7 @@ protected BufferingAppenderSkeleton(bool eventMustBeFixed)
/// Gets or sets a value that indicates whether the appender is lossy.
/// </summary>
/// <value>
- /// <c>true</c> if the appender is lossy, otherwise <c>false</c>. The default is <c>false</c>.
+ /// <see langword="true"/> if the appender is lossy, otherwise <see langword="false"/>. The default is <see langword="false"/>.
/// </value>
/// <remarks>
/// <para>
@@ -115,10 +115,10 @@ protected BufferingAppenderSkeleton(bool eventMustBeFixed)
/// delivering them. A triggering event causes the whole buffer
/// to be sent to the remote sink. If the buffer overruns before
/// a triggering event then logging events could be lost. Set
- /// <see cref="Lossy"/> to <c>false</c> to prevent logging events
+ /// <see cref="Lossy"/> to <see langword="false"/> to prevent logging events
/// from being lost.
/// </para>
- /// <para>If <see cref="Lossy"/> is set to <c>true</c> then an
+ /// <para>If <see cref="Lossy"/> is set to <see langword="true"/> then an
/// <see cref="Evaluator"/> must be specified.</para>
/// </remarks>
public bool Lossy { get; set; }
@@ -162,7 +162,7 @@ protected BufferingAppenderSkeleton(bool eventMustBeFixed)
/// appender. If the evaluator triggers then the current buffer will
/// immediately be sent (see <see cref="SendBuffer(LoggingEvent[])"/>).
/// </para>
- /// <para>If <see cref="Lossy"/> is set to <c>true</c> then an
+ /// <para>If <see cref="Lossy"/> is set to <see langword="true"/> then an
/// <see cref="Evaluator"/> must be specified.</para>
/// </remarks>
public ITriggeringEventEvaluator? Evaluator { get; set; }
@@ -202,7 +202,7 @@ protected BufferingAppenderSkeleton(bool eventMustBeFixed)
/// Flushes any buffered log data.
/// </summary>
/// <param name="millisecondsTimeout">The maximum time to wait for logging events to be flushed.</param>
- /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if all logging events were flushed successfully, else <see langword="false"/>.</returns>
public override bool Flush(int millisecondsTimeout)
{
Flush();
@@ -226,21 +226,21 @@ public override bool Flush(int millisecondsTimeout)
/// <summary>
/// Flush the currently buffered events
/// </summary>
- /// <param name="flushLossyBuffer">set to <c>true</c> to flush the buffer of lossy events</param>
+ /// <param name="flushLossyBuffer">set to <see langword="true"/> to flush the buffer of lossy events</param>
/// <remarks>
/// <para>
/// Flushes events that have been buffered. If <paramref name="flushLossyBuffer" /> is
- /// <c>false</c> then events will only be flushed if this buffer is non-lossy mode.
+ /// <see langword="false"/> then events will only be flushed if this buffer is non-lossy mode.
/// </para>
/// <para>
/// If the appender is buffering in <see cref="Lossy"/> mode then the contents
- /// of the buffer will only be flushed if <paramref name="flushLossyBuffer" /> is <c>true</c>.
+ /// of the buffer will only be flushed if <paramref name="flushLossyBuffer" /> is <see langword="true"/>.
/// In this case the contents of the buffer will be tested against the
/// <see cref="LossyEvaluator"/> and if triggering will be output. All other buffered
/// events will be discarded.
/// </para>
/// <para>
- /// If <paramref name="flushLossyBuffer" /> is <c>true</c> then the buffer will always
+ /// If <paramref name="flushLossyBuffer" /> is <see langword="true"/> then the buffer will always
/// be emptied by calling this method.
/// </para>
/// </remarks>
@@ -262,7 +262,7 @@ public virtual void Flush(bool flushLossyBuffer)
{
// Test the contents of the buffer against the lossy evaluator
LoggingEvent[] bufferedEvents = _cyclicBuffer.PopAll();
- var filteredEvents = new List<LoggingEvent>(bufferedEvents.Length);
+ List<LoggingEvent> filteredEvents = new(bufferedEvents.Length);
foreach (LoggingEvent loggingEvent in bufferedEvents)
{
diff --git a/src/log4net/Appender/BufferingForwardingAppender.cs b/src/log4net/Appender/BufferingForwardingAppender.cs
index 324f4e9a..47ca516b 100644
--- a/src/log4net/Appender/BufferingForwardingAppender.cs
+++ b/src/log4net/Appender/BufferingForwardingAppender.cs
@@ -138,7 +138,7 @@ public virtual AppenderCollection Appenders
/// </summary>
/// <param name="name">The name of the appender to lookup.</param>
/// <returns>
- /// The appender with the specified name, or <c>null</c>.
+ /// The appender with the specified name, or <see langword="null"/>.
/// </returns>
public virtual IAppender? GetAppender(string? name)
{
diff --git a/src/log4net/Appender/DebugAppender.cs b/src/log4net/Appender/DebugAppender.cs
index caf45348..41bcbc73 100644
--- a/src/log4net/Appender/DebugAppender.cs
+++ b/src/log4net/Appender/DebugAppender.cs
@@ -48,7 +48,7 @@ public class DebugAppender : AppenderSkeleton
/// </summary>
/// <remarks>
/// <para>The default behavior is to flush at the end of each
- /// write. If the option is set to<c>false</c>, then the underlying
+ /// write. If the option is set to<see langword="false"/>, then the underlying
/// stream can defer writing to physical medium to a later time.
/// </para>
/// <para>
@@ -77,7 +77,7 @@ public class DebugAppender : AppenderSkeleton
/// Flushes any buffered log data.
/// </summary>
/// <param name="millisecondsTimeout">The maximum time to wait for logging events to be flushed.</param>
- /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if all logging events were flushed successfully, else <see langword="false"/>.</returns>
public override bool Flush(int millisecondsTimeout)
{
// Nothing to do if ImmediateFlush is true
@@ -99,7 +99,7 @@ public override bool Flush(int millisecondsTimeout)
/// <remarks>
/// <para>
/// Writes the logging event to the <see cref="System.Diagnostics.Debug"/> system.
- /// If <see cref="ImmediateFlush"/> is <c>true</c> then the <see cref="System.Diagnostics.Debug.Flush"/>
+ /// If <see cref="ImmediateFlush"/> is <see langword="true"/> then the <see cref="System.Diagnostics.Debug.Flush"/>
/// is called.
/// </para>
/// </remarks>
diff --git a/src/log4net/Appender/EventLogAppender.cs b/src/log4net/Appender/EventLogAppender.cs
index 8a8bfa8c..a8e66c04 100644
--- a/src/log4net/Appender/EventLogAppender.cs
+++ b/src/log4net/Appender/EventLogAppender.cs
@@ -42,8 +42,8 @@ namespace log4net.Appender;
/// on the <see cref="LoggingEvent"/>.
/// </para>
/// <para>
-/// The <c>Category</c> of the event log entry can be
-/// set using the <c>Category</c> property (<see cref="LoggingEvent.Properties"/>)
+/// The <see cref="Category"/> of the event log entry can be
+/// set using the <see cref="Category"/> property (<see cref="LoggingEvent.Properties"/>)
/// on the <see cref="LoggingEvent"/>.
/// </para>
/// <para>
@@ -174,7 +174,7 @@ public EventLogAppender()
public SecurityContext? SecurityContext { get; set; }
/// <summary>
- /// Gets or sets the <c>EventId</c> to use unless one is explicitly specified via the <c>LoggingEvent</c>'s properties.
+ /// Gets or sets the <see cref="EventId"/> to use unless one is explicitly specified via the <c>LoggingEvent</c>'s properties.
/// </summary>
/// <remarks>
/// <para>
@@ -188,12 +188,12 @@ public EventLogAppender()
/// <summary>
- /// Gets or sets the <c>Category</c> to use unless one is explicitly specified via the <c>LoggingEvent</c>'s properties.
+ /// Gets or sets the <see cref="Category"/> to use unless one is explicitly specified via the <c>LoggingEvent</c>'s properties.
/// </summary>
/// <remarks>
/// <para>
- /// The <c>Category</c> of the event log entry will normally be
- /// set using the <c>Category</c> property (<see cref="LoggingEvent.Properties"/>)
+ /// The <see cref="Category"/> of the event log entry will normally be
+ /// set using the <see cref="Category"/> property (<see cref="LoggingEvent.Properties"/>)
/// on the <see cref="LoggingEvent"/>.
/// This property provides the fallback value which defaults to 0.
/// </para>
@@ -287,7 +287,7 @@ public override void ActivateOptions()
/// </summary>
private static void CreateEventSource(string source, string logName, string machineName)
{
- var eventSourceCreationData = new EventSourceCreationData(source, logName)
+ EventSourceCreationData eventSourceCreationData = new(source, logName)
{
MachineName = machineName
};
@@ -402,7 +402,7 @@ protected override void Append(LoggingEvent loggingEvent)
/// <summary>
/// This appender requires a <see cref="Layout"/> to be set.
/// </summary>
- /// <value><c>true</c></value>
+ /// <value><see langword="true"/></value>
protected override bool RequiresLayout => true;
/// <summary>
diff --git a/src/log4net/Appender/ForwardingAppender.cs b/src/log4net/Appender/ForwardingAppender.cs
index 609a65d9..ed0f485f 100644
--- a/src/log4net/Appender/ForwardingAppender.cs
+++ b/src/log4net/Appender/ForwardingAppender.cs
@@ -128,7 +128,7 @@ public virtual AppenderCollection Appenders
/// </summary>
/// <param name="name">The name of the appender to lookup.</param>
/// <returns>
- /// The appender with the specified name, or <c>null</c>.
+ /// The appender with the specified name, or <see langword="null"/>.
/// </returns>
/// <remarks>
/// <para>
diff --git a/src/log4net/Appender/IFlushable.cs b/src/log4net/Appender/IFlushable.cs
index 0952a8d1..ac2c5de3 100644
--- a/src/log4net/Appender/IFlushable.cs
+++ b/src/log4net/Appender/IFlushable.cs
@@ -51,6 +51,6 @@ public interface IFlushable
/// </para>
/// </remarks>
/// <param name="millisecondsTimeout">The maximum time to wait for logging events to be flushed.</param>
- /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if all logging events were flushed successfully, else <see langword="false"/>.</returns>
bool Flush(int millisecondsTimeout);
}
\ No newline at end of file
diff --git a/src/log4net/Appender/RollingFileAppender.cs b/src/log4net/Appender/RollingFileAppender.cs
index 5e983df3..55b30078 100644
--- a/src/log4net/Appender/RollingFileAppender.cs
+++ b/src/log4net/Appender/RollingFileAppender.cs
@@ -1238,7 +1238,7 @@ protected void DeleteFile(string fileName)
/// If <c>countDirection</c> < 0, then files
/// {<c>File.1</c>, ..., <c>File.curSizeRollBackups -1</c>}
/// are renamed to {<c>File.2</c>, ...,
- /// <c>File.curSizeRollBackups</c>}. Moreover, <c>File</c> is
+ /// <c>File.curSizeRollBackups</c>}. Moreover, <see langword="file"/> is
/// renamed <c>File.1</c> and closed.
/// </para>
/// <para>
@@ -1246,10 +1246,10 @@ protected void DeleteFile(string fileName)
/// </para>
/// <para>
/// If <c>maxSizeRollBackups</c> is equal to zero, then the
- /// <c>File</c> is truncated with no backup files created.
+ /// <see langword="file"/> is truncated with no backup files created.
/// </para>
/// <para>
- /// If <c>maxSizeRollBackups</c> < 0, then <c>File</c> is
+ /// If <c>maxSizeRollBackups</c> < 0, then <see langword="file"/> is
/// renamed if needed and no files are deleted.
/// </para>
/// </remarks>
@@ -1292,10 +1292,10 @@ protected void RollOverSize()
/// </para>
/// <para>
/// If <c>maxSizeRollBackups</c> is equal to zero, then the
- /// <c>File</c> is truncated with no backup files created.
+ /// <see langword="file"/> is truncated with no backup files created.
/// </para>
/// <para>
- /// If <c>maxSizeRollBackups</c> < 0, then <c>File</c> is
+ /// If <c>maxSizeRollBackups</c> < 0, then <see langword="file"/> is
/// renamed if needed and no files are deleted.
/// </para>
/// <para>
diff --git a/src/log4net/Appender/SmtpAppender.cs b/src/log4net/Appender/SmtpAppender.cs
index 1b56b662..77683ef9 100644
--- a/src/log4net/Appender/SmtpAppender.cs
+++ b/src/log4net/Appender/SmtpAppender.cs
@@ -254,7 +254,7 @@ protected override void SendBuffer(LoggingEvent[] events)
// appender. This frees us from needing to synchronize again.
try
{
- using var writer = new StringWriter(System.Globalization.CultureInfo.InvariantCulture);
+ using StringWriter writer = new(System.Globalization.CultureInfo.InvariantCulture);
if (Layout?.Header is string header)
{
@@ -314,7 +314,7 @@ protected virtual void SendEmail(string messageBody)
smtpClient.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
}
- using var mailMessage = new MailMessage();
+ using MailMessage mailMessage = new();
mailMessage.Body = messageBody;
mailMessage.BodyEncoding = BodyEncoding;
mailMessage.From = new MailAddress(From.EnsureNotNull());
diff --git a/src/log4net/Appender/TextWriterAppender.cs b/src/log4net/Appender/TextWriterAppender.cs
index e4d58ec4..3321b152 100644
--- a/src/log4net/Appender/TextWriterAppender.cs
+++ b/src/log4net/Appender/TextWriterAppender.cs
@@ -54,7 +54,7 @@ public class TextWriterAppender : AppenderSkeleton
/// append operation.
/// </para>
/// <para>
- /// If this option is set to <c>false</c>, then the underlying
+ /// If this option is set to <see langword="false"/>, then the underlying
/// stream can defer persisting the logging event to a later
/// time.
/// </para>
@@ -110,7 +110,7 @@ public class TextWriterAppender : AppenderSkeleton
/// layout has been set.
/// </para>
/// </remarks>
- /// <returns><c>false</c> if any of the preconditions fail.</returns>
+ /// <returns><see langword="false"/> if any of the preconditions fail.</returns>
protected override bool PreAppendCheck()
{
if (!base.PreAppendCheck())
@@ -372,7 +372,7 @@ protected virtual void PrepareWriter()
/// Flushes any buffered log data.
/// </summary>
/// <param name="millisecondsTimeout">The maximum time to wait for logging events to be flushed.</param>
- /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if all logging events were flushed successfully, else <see langword="false"/>.</returns>
public override bool Flush(int millisecondsTimeout)
{
// Nothing to do if ImmediateFlush is true
diff --git a/src/log4net/Appender/TraceAppender.cs b/src/log4net/Appender/TraceAppender.cs
index f025795d..919da3ae 100644
--- a/src/log4net/Appender/TraceAppender.cs
+++ b/src/log4net/Appender/TraceAppender.cs
@@ -59,7 +59,7 @@ public class TraceAppender : AppenderSkeleton
/// </summary>
/// <remarks>
/// <para>The default behavior is to flush at the end of each
- /// write. If the option is set to<c>false</c>, then the underlying
+ /// write. If the option is set to<see langword="false"/>, then the underlying
/// stream can defer writing to physical medium to a later time.
/// </para>
/// <para>
@@ -107,7 +107,7 @@ protected override void Append(LoggingEvent loggingEvent)
/// Flushes any buffered log data.
/// </summary>
/// <param name="millisecondsTimeout">The maximum time to wait for logging events to be flushed.</param>
- /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if all logging events were flushed successfully, else <see langword="false"/>.</returns>
public override bool Flush(int millisecondsTimeout)
{
// Nothing to do if ImmediateFlush is true
diff --git a/src/log4net/Config/XmlConfiguratorAttribute.cs b/src/log4net/Config/XmlConfiguratorAttribute.cs
index 0bf39053..0f3af574 100644
--- a/src/log4net/Config/XmlConfiguratorAttribute.cs
+++ b/src/log4net/Config/XmlConfiguratorAttribute.cs
@@ -134,11 +134,11 @@ public sealed class XmlConfiguratorAttribute : ConfiguratorAttribute
/// Gets or sets a value indicating whether to watch the configuration file.
/// </summary>
/// <value>
- /// <c>true</c> if the configuration should be watched, <c>false</c> otherwise.
+ /// <see langword="true"/> if the configuration should be watched, <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// <para>
- /// If this flag is specified and set to <c>true</c> then the framework
+ /// If this flag is specified and set to <see langword="true"/> then the framework
/// will watch the configuration file and will reload the config each time
/// the file is modified.
/// </para>
@@ -170,7 +170,7 @@ public sealed class XmlConfiguratorAttribute : ConfiguratorAttribute
/// <exception cref="ArgumentOutOfRangeException">The <paramref name="targetRepository" /> does not extend <see cref="Hierarchy"/>.</exception>
public override void Configure(Assembly sourceAssembly, ILoggerRepository targetRepository)
{
- var configurationMessages = new List<LogLog>();
+ List<LogLog> configurationMessages = new();
using (new LogLog.LogReceivedAdapter(configurationMessages))
{
@@ -344,7 +344,7 @@ private void ConfigureFromUri(ILoggerRepository targetRepository)
if (systemConfigFilePath is not null)
{
- var builder = new UriBuilder(new Uri(systemConfigFilePath));
+ UriBuilder builder = new(new Uri(systemConfigFilePath));
// Remove the current extension from the systemConfigFileUri path
string path = builder.Path;
diff --git a/src/log4net/Core/DefaultRepositorySelector.cs b/src/log4net/Core/DefaultRepositorySelector.cs
index 4cc14c88..a14d6c82 100644
--- a/src/log4net/Core/DefaultRepositorySelector.cs
+++ b/src/log4net/Core/DefaultRepositorySelector.cs
@@ -117,7 +117,7 @@ public ILoggerRepository GetRepository(Assembly assembly)
/// <returns>The <see cref="ILoggerRepository"/> for the specified repository.</returns>
/// <remarks>
/// <para>
- /// Returns the named repository. If <paramref name="repositoryName"/> is <c>null</c>
+ /// Returns the named repository. If <paramref name="repositoryName"/> is <see langword="null"/>
/// a <see cref="ArgumentNullException"/> is thrown. If the repository
/// does not exist a <see cref="LogException"/> is thrown.
/// </para>
@@ -184,7 +184,7 @@ public ILoggerRepository CreateRepository(Assembly assembly, Type repositoryType
/// <param name="repositoryAssembly">the assembly to use to create the repository to associate with the <see cref="ILoggerRepository"/>.</param>
/// <param name="repositoryType">The type of repository to create, must implement <see cref="ILoggerRepository"/>.</param>
/// <param name="repositoryName">The name to assign to the created repository</param>
- /// <param name="readAssemblyAttributes">Set to <c>true</c> to read and apply the assembly attributes</param>
+ /// <param name="readAssemblyAttributes">Set to <see langword="true"/> to read and apply the assembly attributes</param>
/// <returns>The repository created.</returns>
/// <remarks>
/// <para>
@@ -372,7 +372,7 @@ public ILoggerRepository CreateRepository(string repositoryName, Type? repositor
/// Test if a named repository exists
/// </summary>
/// <param name="repositoryName">the named repository to check</param>
- /// <returns><c>true</c> if the repository exists</returns>
+ /// <returns><see langword="true"/> if the repository exists</returns>
/// <remarks>
/// <para>
/// Test if a named repository exists. Use <see cref="CreateRepository(string, Type)"/>
diff --git a/src/log4net/Core/ExceptionEvaluator.cs b/src/log4net/Core/ExceptionEvaluator.cs
index 5fd50882..afdc9988 100644
--- a/src/log4net/Core/ExceptionEvaluator.cs
+++ b/src/log4net/Core/ExceptionEvaluator.cs
@@ -68,9 +68,9 @@ public ExceptionEvaluator(Type exType, bool triggerOnSubClass)
/// Is this <paramref name="loggingEvent"/> the triggering event?
/// </summary>
/// <param name="loggingEvent">The event to check</param>
- /// <returns>This method returns <c>true</c>, if the logging event Exception
+ /// <returns>This method returns <see langword="true"/>, if the logging event Exception
/// Type is <see cref="ExceptionType"/>.
- /// Otherwise it returns <c>false</c></returns>
+ /// Otherwise it returns <see langword="false"/></returns>
/// <remarks>
/// <para>
/// This evaluator will trigger if the Exception Type of the event
diff --git a/src/log4net/Core/IAppenderAttachable.cs b/src/log4net/Core/IAppenderAttachable.cs
index 241318e7..acdf866f 100644
--- a/src/log4net/Core/IAppenderAttachable.cs
+++ b/src/log4net/Core/IAppenderAttachable.cs
@@ -56,7 +56,7 @@ public interface IAppenderAttachable
/// Gets a collection of attached appenders.
/// If there are no attached appenders the
/// implementation should return an empty
- /// collection rather than <c>null</c>.
+ /// collection rather than <see langword="null"/>.
/// </para>
/// </remarks>
AppenderCollection Appenders { get; }
@@ -66,13 +66,13 @@ public interface IAppenderAttachable
/// </summary>
/// <param name="name">The name of the appender to get.</param>
/// <returns>
- /// The appender with the name specified, or <c>null</c> if no appender with the
+ /// The appender with the name specified, or <see langword="null"/> if no appender with the
/// specified name is found.
/// </returns>
/// <remarks>
/// <para>
/// Returns an attached appender with the <paramref name="name"/> specified.
- /// If no appender with the specified name is found <c>null</c> will be
+ /// If no appender with the specified name is found <see langword="null"/> will be
/// returned.
/// </para>
/// </remarks>
diff --git a/src/log4net/Core/ILogger.cs b/src/log4net/Core/ILogger.cs
index 21272a69..ebf36867 100644
--- a/src/log4net/Core/ILogger.cs
+++ b/src/log4net/Core/ILogger.cs
@@ -51,7 +51,7 @@ public interface ILogger
/// the stack boundary into the logging system for this call.</param>
/// <param name="level">The level of the message to be logged.</param>
/// <param name="message">The message object to log.</param>
- /// <param name="exception">the exception to log, including its stack trace. Pass <c>null</c> to not log an exception.</param>
+ /// <param name="exception">the exception to log, including its stack trace. Pass <see langword="null"/> to not log an exception.</param>
/// <remarks>
/// <para>
/// This generic form is intended to be used by wrappers.
@@ -76,7 +76,7 @@ public interface ILogger
/// </summary>
/// <param name="level">The level to check.</param>
/// <returns>
- /// <c>true</c> if this logger is enabled for <c>level</c>, otherwise <c>false</c>.
+ /// <see langword="true"/> if this logger is enabled for <c>level</c>, otherwise <see langword="false"/>.
/// </returns>
bool IsEnabledFor(Level? level);
diff --git a/src/log4net/Core/IRepositorySelector.cs b/src/log4net/Core/IRepositorySelector.cs
index d5ff2cad..2ac3d52d 100644
--- a/src/log4net/Core/IRepositorySelector.cs
+++ b/src/log4net/Core/IRepositorySelector.cs
@@ -148,7 +148,7 @@ public interface IRepositorySelector
/// Test if a named repository exists
/// </summary>
/// <param name="repositoryName">the named repository to check</param>
- /// <returns><c>true</c> if the repository exists</returns>
+ /// <returns><see langword="true"/> if the repository exists</returns>
/// <remarks>
/// <para>
/// Test if a named repository exists. Use <see cref="CreateRepository(Assembly, Type)"/>
diff --git a/src/log4net/Core/ITriggeringEventEvaluator.cs b/src/log4net/Core/ITriggeringEventEvaluator.cs
index 9321c26b..6f052ab1 100644
--- a/src/log4net/Core/ITriggeringEventEvaluator.cs
+++ b/src/log4net/Core/ITriggeringEventEvaluator.cs
@@ -38,10 +38,10 @@ public interface ITriggeringEventEvaluator
/// Test if this event triggers the action
/// </summary>
/// <param name="loggingEvent">The event to check</param>
- /// <returns><c>true</c> if this event triggers the action, otherwise <c>false</c></returns>
+ /// <returns><see langword="true"/> if this event triggers the action, otherwise <see langword="false"/></returns>
/// <remarks>
/// <para>
- /// Return <c>true</c> if this event triggers the action
+ /// Return <see langword="true"/> if this event triggers the action
/// </para>
/// </remarks>
bool IsTriggeringEvent(LoggingEvent loggingEvent);
diff --git a/src/log4net/Core/LevelCollection.cs b/src/log4net/Core/LevelCollection.cs
index 9196d50b..e666d256 100644
--- a/src/log4net/Core/LevelCollection.cs
+++ b/src/log4net/Core/LevelCollection.cs
@@ -44,8 +44,8 @@ public interface ILevelCollectionEnumerator
/// Advances the enumerator to the next element in the collection.
/// </summary>
/// <returns>
- /// <c>true</c> if the enumerator was successfully advanced to the next element;
- /// <c>false</c> if the enumerator has passed the end of the collection.
+ /// <see langword="true"/> if the enumerator was successfully advanced to the next element;
+ /// <see langword="false"/> if the enumerator has passed the end of the collection.
/// </returns>
/// <exception cref="InvalidOperationException">
/// The collection was modified after the enumerator was created.
@@ -64,35 +64,35 @@ public interface ILevelCollectionEnumerator
private int _version;
/// <summary>
- /// Creates a read-only wrapper for a <c>LevelCollection</c> instance.
+ /// Creates a read-only wrapper for a <see cref="LevelCollection"/> instance.
/// </summary>
/// <param name="list">list to create a readonly wrapper arround</param>
/// <returns>
- /// A <c>LevelCollection</c> wrapper that is read-only.
+ /// A <see cref="LevelCollection"/> wrapper that is read-only.
/// </returns>
public static LevelCollection ReadOnly(LevelCollection list)
=> new ReadOnlyLevelCollection(list.EnsureNotNull());
/// <summary>
- /// Initializes a new instance of the <c>LevelCollection</c> class
+ /// Initializes a new instance of the <see cref="LevelCollection"/> class
/// that is empty and has the default initial capacity.
/// </summary>
public LevelCollection() => _array = new Level[DefaultCapacity];
/// <summary>
- /// Initializes a new instance of the <c>LevelCollection</c> class
+ /// Initializes a new instance of the <see cref="LevelCollection"/> class
/// that has the specified initial capacity.
/// </summary>
/// <param name="capacity">
- /// The number of elements that the new <c>LevelCollection</c> is initially capable of storing.
+ /// The number of elements that the new <see cref="LevelCollection"/> is initially capable of storing.
/// </param>
public LevelCollection(int capacity) => _array = new Level[capacity];
/// <summary>
- /// Initializes a new instance of the <c>LevelCollection</c> class
- /// that contains elements copied from the specified <c>LevelCollection</c>.
+ /// Initializes a new instance of the <see cref="LevelCollection"/> class
+ /// that contains elements copied from the specified <see cref="LevelCollection"/>.
/// </summary>
- /// <param name="collection">The <c>LevelCollection</c> whose elements are copied to the new collection.</param>
+ /// <param name="collection">The <see cref="LevelCollection"/> whose elements are copied to the new collection.</param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2214:Do not call overridable methods in constructors")]
public LevelCollection(LevelCollection collection)
{
@@ -101,7 +101,7 @@ public LevelCollection(LevelCollection collection)
}
/// <summary>
- /// Initializes a new instance of the <c>LevelCollection</c> class
+ /// Initializes a new instance of the <see cref="LevelCollection"/> class
/// that contains elements copied from the specified <see cref="Level"/> array.
/// </summary>
/// <param name="array">The <see cref="Level"/> array whose elements are copied to the new list.</param>
@@ -113,7 +113,7 @@ public LevelCollection(Level[] array)
}
/// <summary>
- /// Initializes a new instance of the <c>LevelCollection</c> class
+ /// Initializes a new instance of the <see cref="LevelCollection"/> class
/// that contains elements copied from the specified <see cref="Level"/> collection.
/// </summary>
/// <param name="collection">The <see cref="Level"/> collection whose elements are copied to the new list.</param>
@@ -125,7 +125,7 @@ public LevelCollection(ICollection collection)
}
/// <summary>
- /// Initializes a new instance of the <c>LevelCollection</c> class
+ /// Initializes a new instance of the <see cref="LevelCollection"/> class
/// that contains elements copied from the specified <see cref="Level"/> collection.
/// </summary>
/// <param name="collection">The <see cref="Level"/> collection whose elements are copied to the new list.</param>
@@ -154,19 +154,19 @@ protected internal enum Tag
protected internal LevelCollection(Tag _) => _array = Array.Empty<Level>();
/// <summary>
- /// Gets the number of elements actually contained in the <c>LevelCollection</c>.
+ /// Gets the number of elements actually contained in the <see cref="LevelCollection"/>.
/// </summary>
public virtual int Count { get; private set; }
/// <summary>
- /// Copies the entire <c>LevelCollection</c> to a one-dimensional
+ /// Copies the entire <see cref="LevelCollection"/> to a one-dimensional
/// <see cref="Level"/> array.
/// </summary>
/// <param name="array">The one-dimensional <see cref="Level"/> array to copy to.</param>
public virtual void CopyTo(Level[] array) => CopyTo(array, 0);
/// <summary>
- /// Copies the entire <c>LevelCollection</c> to a one-dimensional
+ /// Copies the entire <see cref="LevelCollection"/> to a one-dimensional
/// <see cref="Level"/> array, starting at the specified index of the target array.
/// </summary>
/// <param name="array">The one-dimensional <see cref="Level"/> array to copy to.</param>
@@ -217,9 +217,9 @@ public virtual void CopyTo(Level[] array, int start)
}
/// <summary>
- /// Adds a <see cref="Level"/> to the end of the <c>LevelCollection</c>.
+ /// Adds a <see cref="Level"/> to the end of the <see cref="LevelCollection"/>.
/// </summary>
- /// <param name="item">The <see cref="Level"/> to be added to the end of the <c>LevelCollection</c>.</param>
+ /// <param name="item">The <see cref="Level"/> to be added to the end of the <see cref="LevelCollection"/>.</param>
/// <returns>The index at which the value has been added.</returns>
public virtual int Add(Level item)
{
@@ -235,7 +235,7 @@ public virtual int Add(Level item)
}
/// <summary>
- /// Removes all elements from the <c>LevelCollection</c>.
+ /// Removes all elements from the <see cref="LevelCollection"/>.
/// </summary>
public virtual void Clear()
{
@@ -250,7 +250,7 @@ public virtual void Clear()
/// <returns>A new <see cref="LevelCollection"/> with a shallow copy of the collection data.</returns>
public virtual object Clone()
{
- var newCol = new LevelCollection(Count);
+ LevelCollection newCol = new(Count);
Array.Copy(_array, 0, newCol._array, 0, Count);
newCol.Count = Count;
newCol._version = _version;
@@ -259,10 +259,10 @@ public virtual object Clone()
}
/// <summary>
- /// Determines whether a given <see cref="Level"/> is in the <c>LevelCollection</c>.
+ /// Determines whether a given <see cref="Level"/> is in the <see cref="LevelCollection"/>.
/// </summary>
/// <param name="item">The <see cref="Level"/> to check for.</param>
- /// <returns><c>true</c> if <paramref name="item"/> is found in the <c>LevelCollection</c>; otherwise, <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if <paramref name="item"/> is found in the <see cref="LevelCollection"/>; otherwise, <see langword="false"/>.</returns>
public virtual bool Contains(Level item)
{
for (int i = 0; i != Count; ++i)
@@ -277,12 +277,12 @@ public virtual bool Contains(Level item)
/// <summary>
/// Returns the zero-based index of the first occurrence of a <see cref="Level"/>
- /// in the <c>LevelCollection</c>.
+ /// in the <see cref="LevelCollection"/>.
/// </summary>
- /// <param name="item">The <see cref="Level"/> to locate in the <c>LevelCollection</c>.</param>
+ /// <param name="item">The <see cref="Level"/> to locate in the <see cref="LevelCollection"/>.</param>
/// <returns>
/// The zero-based index of the first occurrence of <paramref name="item"/>
- /// in the entire <c>LevelCollection</c>, if found; otherwise, -1.
+ /// in the entire <see cref="LevelCollection"/>, if found; otherwise, -1.
/// </returns>
public virtual int IndexOf(Level item)
{
@@ -297,7 +297,7 @@ public virtual int IndexOf(Level item)
}
/// <summary>
- /// Inserts an element into the <c>LevelCollection</c> at the specified index.
+ /// Inserts an element into the <see cref="LevelCollection"/> at the specified index.
/// </summary>
/// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
/// <param name="item">The <see cref="Level"/> to insert.</param>
@@ -326,11 +326,11 @@ public virtual void Insert(int index, Level item)
}
/// <summary>
- /// Removes the first occurrence of a specific <see cref="Level"/> from the <c>LevelCollection</c>.
+ /// Removes the first occurrence of a specific <see cref="Level"/> from the <see cref="LevelCollection"/>.
/// </summary>
- /// <param name="item">The <see cref="Level"/> to remove from the <c>LevelCollection</c>.</param>
+ /// <param name="item">The <see cref="Level"/> to remove from the <see cref="LevelCollection"/>.</param>
/// <exception cref="ArgumentException">
- /// The specified <see cref="Level"/> was not found in the <c>LevelCollection</c>.
+ /// The specified <see cref="Level"/> was not found in the <see cref="LevelCollection"/>.
/// </exception>
public virtual void Remove(Level item)
{
@@ -345,7 +345,7 @@ public virtual void Remove(Level item)
}
/// <summary>
- /// Removes the element at the specified index of the <c>LevelCollection</c>.
+ /// Removes the element at the specified index of the <see cref="LevelCollection"/>.
/// </summary>
/// <param name="index">The zero-based index of the element to remove.</param>
/// <exception cref="ArgumentOutOfRangeException">
@@ -385,13 +385,13 @@ public virtual void RemoveAt(int index)
public virtual bool IsReadOnly => false;
/// <summary>
- /// Returns an enumerator that can iterate through the <c>LevelCollection</c>.
+ /// Returns an enumerator that can iterate through the <see cref="LevelCollection"/>.
/// </summary>
- /// <returns>An <see cref="Enumerator"/> for the entire <c>LevelCollection</c>.</returns>
+ /// <returns>An <see cref="Enumerator"/> for the entire <see cref="LevelCollection"/>.</returns>
public virtual ILevelCollectionEnumerator GetEnumerator() => new Enumerator(this);
/// <summary>
- /// Gets or sets the number of elements the <c>LevelCollection</c> can contain.
+ /// Gets or sets the number of elements the <see cref="LevelCollection"/> can contain.
/// </summary>
public virtual int Capacity
{
@@ -420,10 +420,10 @@ public virtual int Capacity
}
/// <summary>
- /// Adds the elements of another <c>LevelCollection</c> to the current <c>LevelCollection</c>.
+ /// Adds the elements of another <see cref="LevelCollection"/> to the current <see cref="LevelCollection"/>.
/// </summary>
- /// <param name="collection">The <c>LevelCollection</c> whose elements should be added to the end of the current <c>LevelCollection</c>.</param>
- /// <returns>The new <see cref="Count"/> of the <c>LevelCollection</c>.</returns>
+ /// <param name="collection">The <see cref="LevelCollection"/> whose elements should be added to the end of the current <see cref="LevelCollection"/>.</param>
+ /// <returns>The new <see cref="Count"/> of the <see cref="LevelCollection"/>.</returns>
public virtual int AddRange(LevelCollection collection)
{
if (Count + collection.EnsureNotNull().Count >= _array.Length)
@@ -439,10 +439,10 @@ public virtual int AddRange(LevelCollection collection)
}
/// <summary>
- /// Adds the elements of a <see cref="Level"/> array to the current <c>LevelCollection</c>.
+ /// Adds the elements of a <see cref="Level"/> array to the current <see cref="LevelCollection"/>.
/// </summary>
- /// <param name="array">The <see cref="Level"/> array whose elements should be added to the end of the <c>LevelCollection</c>.</param>
- /// <returns>The new <see cref="Count"/> of the <c>LevelCollection</c>.</returns>
+ /// <param name="array">The <see cref="Level"/> array whose elements should be added to the end of the <see cref="LevelCollection"/>.</param>
+ /// <returns>The new <see cref="Count"/> of the <see cref="LevelCollection"/>.</returns>
public virtual int AddRange(Level[] array)
{
if (Count + array.EnsureNotNull().Length >= _array.Length)
@@ -458,10 +458,10 @@ public virtual int AddRange(Level[] array)
}
/// <summary>
- /// Adds the elements of a <see cref="Level"/> collection to the current <c>LevelCollection</c>.
+ /// Adds the elements of a <see cref="Level"/> collection to the current <see cref="LevelCollection"/>.
/// </summary>
- /// <param name="collection">The <see cref="Level"/> collection whose elements should be added to the end of the <c>LevelCollection</c>.</param>
- /// <returns>The new <see cref="Count"/> of the <c>LevelCollection</c>.</returns>
+ /// <param name="collection">The <see cref="Level"/> collection whose elements should be added to the end of the <see cref="LevelCollection"/>.</param>
+ /// <returns>The new <see cref="Count"/> of the <see cref="LevelCollection"/>.</returns>
public virtual int AddRange(ICollection collection)
{
if (Count + collection.EnsureNotNull().Count >= _array.Length)
@@ -547,7 +547,7 @@ private sealed class Enumerator : IEnumerator, ILevelCollectionEnumerator
private readonly int _version;
/// <summary>
- /// Initializes a new instance of the <c>Enumerator</c> class.
+ /// Initializes a new instance of the <see cref="Enumerator"/> class.
/// </summary>
/// <param name="tc"></param>
internal Enumerator(LevelCollection tc)
@@ -566,8 +566,8 @@ internal Enumerator(LevelCollection tc)
/// Advances the enumerator to the next element in the collection.
/// </summary>
/// <returns>
- /// <c>true</c> if the enumerator was successfully advanced to the next element;
- /// <c>false</c> if the enumerator has passed the end of the collection.
+ /// <see langword="true"/> if the enumerator was successfully advanced to the next element;
+ /// <see langword="false"/> if the enumerator has passed the end of the collection.
/// </returns>
/// <exception cref="InvalidOperationException">
/// The collection was modified after the enumerator was created.
diff --git a/src/log4net/Core/LevelEvaluator.cs b/src/log4net/Core/LevelEvaluator.cs
index da056ff5..5be88665 100644
--- a/src/log4net/Core/LevelEvaluator.cs
+++ b/src/log4net/Core/LevelEvaluator.cs
@@ -71,9 +71,9 @@ public LevelEvaluator()
/// Is this <paramref name="loggingEvent"/> the triggering event?
/// </summary>
/// <param name="loggingEvent">The event to check</param>
- /// <returns>This method returns <c>true</c>, if the event level
+ /// <returns>This method returns <see langword="true"/>, if the event level
/// is equal or higher than the <see cref="Threshold"/>.
- /// Otherwise it returns <c>false</c></returns>
+ /// Otherwise it returns <see langword="false"/></returns>
public bool IsTriggeringEvent(LoggingEvent loggingEvent)
=> loggingEvent.EnsureNotNull().Level is null || loggingEvent.Level >= Threshold;
}
diff --git a/src/log4net/Core/LevelMap.cs b/src/log4net/Core/LevelMap.cs
index 485af58c..a72c7e04 100644
--- a/src/log4net/Core/LevelMap.cs
+++ b/src/log4net/Core/LevelMap.cs
@@ -57,7 +57,7 @@ public sealed class LevelMap
/// Looks up a <see cref="Level"/> by name
/// </summary>
/// <param name="name">The name of the Level to look up.</param>
- /// <returns>A Level from the map with the name specified, or <c>null</c> if none is found.</returns>
+ /// <returns>A Level from the map with the name specified, or <see langword="null"/> if none is found.</returns>
public Level? this[string name]
{
get
diff --git a/src/log4net/Core/LocationInfo.cs b/src/log4net/Core/LocationInfo.cs
index 0d30baaf..963797f1 100644
--- a/src/log4net/Core/LocationInfo.cs
+++ b/src/log4net/Core/LocationInfo.cs
@@ -113,7 +113,7 @@ public LocationInfo(Type? callerStackBoundaryDeclaringType)
{
// take into account the frames we skip above
int adjustedFrameCount = st.FrameCount - frameIndex;
- var stackFramesList = new List<StackFrameItem>(adjustedFrameCount);
+ List<StackFrameItem> stackFramesList = new(adjustedFrameCount);
StackFrames = new StackFrameItem[adjustedFrameCount];
for (int i = frameIndex; i < st.FrameCount; i++)
{
diff --git a/src/log4net/Core/LogImpl.cs b/src/log4net/Core/LogImpl.cs
index aafc32d5..383c1948 100644
--- a/src/log4net/Core/LogImpl.cs
+++ b/src/log4net/Core/LogImpl.cs
@@ -1142,8 +1142,8 @@ public virtual void FatalFormat(IFormatProvider? provider, string format, params
/// level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <c>DEBUG</c> events,
- /// <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <c>DEBUG</c> events,
+ /// <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// <para>
@@ -1174,8 +1174,8 @@ public virtual void FatalFormat(IFormatProvider? provider, string format, params
/// construction if debugging is disabled for <c>log</c>. On
/// the other hand, if the <c>log</c> is debug enabled, you
/// will incur the cost of evaluating whether the logger is debug
- /// enabled twice. Once in <c>IsDebugEnabled</c> and once in
- /// the <c>Debug</c>. This is an insignificant overhead
+ /// enabled twice. Once in <see cref="IsDebugEnabled"/> and once in
+ /// the <see cref="Debug"/>. This is an insignificant overhead
/// since evaluating a logger takes about 1% of the time it
/// takes to actually log.
/// </para>
@@ -1186,8 +1186,8 @@ public virtual void FatalFormat(IFormatProvider? provider, string format, params
/// Checks if this logger is enabled for the <c>INFO</c> level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <c>INFO</c> events,
- /// <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <c>INFO</c> events,
+ /// <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// <para>
@@ -1202,8 +1202,8 @@ public virtual void FatalFormat(IFormatProvider? provider, string format, params
/// Checks if this logger is enabled for the <c>WARN</c> level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <c>WARN</c> events,
- /// <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <c>WARN</c> events,
+ /// <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// <para>
@@ -1218,8 +1218,8 @@ public virtual void FatalFormat(IFormatProvider? provider, string format, params
/// Checks if this logger is enabled for the <c>ERROR</c> level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <c>ERROR</c> events,
- /// <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <c>ERROR</c> events,
+ /// <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// <para>
@@ -1233,8 +1233,8 @@ public virtual void FatalFormat(IFormatProvider? provider, string format, params
/// Checks if this logger is enabled for the <c>FATAL</c> level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <c>FATAL</c> events,
- /// <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <c>FATAL</c> events,
+ /// <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// <para>
diff --git a/src/log4net/Core/LoggerManager.cs b/src/log4net/Core/LoggerManager.cs
index ab6fb89b..8e6917f3 100644
--- a/src/log4net/Core/LoggerManager.cs
+++ b/src/log4net/Core/LoggerManager.cs
@@ -175,14 +175,14 @@ public static ILoggerRepository GetRepository(Assembly repositoryAssembly)
/// <param name="repository">The repository to lookup in.</param>
/// <param name="name">The fully qualified logger name to look for.</param>
/// <returns>
- /// The logger found, or <c>null</c> if the named logger does not exist in the
+ /// The logger found, or <see langword="null"/> if the named logger does not exist in the
/// specified repository.
/// </returns>
/// <remarks>
/// <para>
/// If the named logger exists (in the specified repository) then it
/// returns a reference to the logger, otherwise it returns
- /// <c>null</c>.
+ /// <see langword="null"/>.
/// </para>
/// </remarks>
public static ILogger? Exists(string repository, string name)
@@ -194,14 +194,14 @@ public static ILoggerRepository GetRepository(Assembly repositoryAssembly)
/// <param name="repositoryAssembly">The assembly to use to look up the repository.</param>
/// <param name="name">The fully qualified logger name to look for.</param>
/// <returns>
- /// The logger found, or <c>null</c> if the named logger does not exist in the
+ /// The logger found, or <see langword="null"/> if the named logger does not exist in the
/// specified assembly's repository.
/// </returns>
/// <remarks>
/// <para>
/// If the named logger exists (in the specified assembly's repository) then it
/// returns a reference to the logger, otherwise it returns
- /// <c>null</c>.
+ /// <see langword="null"/>.
/// </para>
/// </remarks>
public static ILogger? Exists(Assembly repositoryAssembly, string name)
@@ -406,8 +406,8 @@ public static void ShutdownRepository(Assembly repositoryAssembly)
/// <para>
/// Resets all values contained in the repository instance to their
/// defaults. This removes all appenders from all loggers, sets
- /// the level of all non-root loggers to <c>null</c>,
- /// sets their additivity flag to <c>true</c> and sets the level
+ /// the level of all non-root loggers to <see langword="null"/>,
+ /// sets their additivity flag to <see langword="true"/> and sets the level
/// of the root logger to <see cref="Level.Debug"/>. Moreover,
/// message disabling is set its default "off" value.
/// </para>
@@ -423,8 +423,8 @@ public static void ResetConfiguration(string repository)
/// <para>
/// Resets all values contained in the repository instance to their
/// defaults. This removes all appenders from all loggers, sets
- /// the level of all non-root loggers to <c>null</c>,
- /// sets their additivity flag to <c>true</c> and sets the level
+ /// the level of all non-root loggers to <see langword="null"/>,
+ /// sets their additivity flag to <see langword="true"/> and sets the level
/// of the root logger to <see cref="Level.Debug"/>. Moreover,
/// message disabling is set its default "off" value.
/// </para>
diff --git a/src/log4net/Core/LoggerWrapperImpl.cs b/src/log4net/Core/LoggerWrapperImpl.cs
index d502c33d..d51e960a 100644
--- a/src/log4net/Core/LoggerWrapperImpl.cs
+++ b/src/log4net/Core/LoggerWrapperImpl.cs
@@ -41,7 +41,7 @@ public abstract class LoggerWrapperImpl(ILogger logger) : ILoggerWrapper
/// </value>
/// <remarks>
/// <para>
- /// The <c>Logger</c> object may not be the same object as this object
+ /// The <see cref="Logger"/> object may not be the same object as this object
/// because of logger decorators.
/// </para>
/// <para>
diff --git a/src/log4net/Core/SecurityContext.cs b/src/log4net/Core/SecurityContext.cs
index 3c6095c0..69010e1a 100644
--- a/src/log4net/Core/SecurityContext.cs
+++ b/src/log4net/Core/SecurityContext.cs
@@ -39,7 +39,7 @@ public abstract class SecurityContext
/// </summary>
/// <param name="state">State supplied by the caller</param>
/// <returns>An <see cref="IDisposable"/> instance that will
- /// revoke the impersonation of this SecurityContext, or <c>null</c></returns>
+ /// revoke the impersonation of this SecurityContext, or <see langword="null"/></returns>
/// <remarks>
/// <para>
/// Impersonate this security context. Further calls on the current
diff --git a/src/log4net/Core/TimeEvaluator.cs b/src/log4net/Core/TimeEvaluator.cs
index e6672f4d..a050f257 100644
--- a/src/log4net/Core/TimeEvaluator.cs
+++ b/src/log4net/Core/TimeEvaluator.cs
@@ -84,9 +84,9 @@ public TimeEvaluator()
/// Is this <paramref name="loggingEvent"/> the triggering event?
/// </summary>
/// <param name="loggingEvent">The event to check</param>
- /// <returns>This method returns <c>true</c>, if the specified time period
+ /// <returns>This method returns <see langword="true"/>, if the specified time period
/// <see cref="Interval"/> has passed since last check..
- /// Otherwise it returns <c>false</c></returns>
+ /// Otherwise it returns <see langword="false"/></returns>
/// <remarks>
/// <para>
/// This evaluator will trigger if the specified time period
diff --git a/src/log4net/Filter/FilterSkeleton.cs b/src/log4net/Filter/FilterSkeleton.cs
index 7b4c5ffb..e6a9e27d 100644
--- a/src/log4net/Filter/FilterSkeleton.cs
+++ b/src/log4net/Filter/FilterSkeleton.cs
@@ -105,7 +105,7 @@ public virtual void ActivateOptions()
/// the chain.
/// </para>
/// <para>
- /// This method is marked <c>abstract</c> and must be implemented
+ /// This method is marked <see langword="abstract"/> and must be implemented
/// in a subclass.
/// </para>
/// </remarks>
diff --git a/src/log4net/Filter/LevelMatchFilter.cs b/src/log4net/Filter/LevelMatchFilter.cs
index 71769cdc..80b3eb0b 100644
--- a/src/log4net/Filter/LevelMatchFilter.cs
+++ b/src/log4net/Filter/LevelMatchFilter.cs
@@ -34,7 +34,7 @@ namespace log4net.Filter;
/// of the <see cref="LevelToMatch"/> option and the <see cref="Level"/> of the
/// <see cref="LoggingEvent"/>, then the <see cref="Decide"/> method returns <see cref="FilterDecision.Accept"/> in
/// case the <see cref="AcceptOnMatch"/> option value is set
-/// to <c>true</c>, if it is <c>false</c> then
+/// to <see langword="true"/>, if it is <see langword="false"/> then
/// <see cref="FilterDecision.Deny"/> is returned. If the <see cref="Level"/> does not match then
/// the result will be <see cref="FilterDecision.Neutral"/>.
/// </para>
@@ -54,7 +54,7 @@ public class LevelMatchFilter : FilterSkeleton
/// logging event, otherwise it will <see cref="FilterDecision.Deny"/> the event.
/// </para>
/// <para>
- /// The default is <c>true</c> i.e. to <see cref="FilterDecision.Accept"/> the event.
+ /// The default is <see langword="true"/> i.e. to <see cref="FilterDecision.Accept"/> the event.
/// </para>
/// </remarks>
public bool AcceptOnMatch { get; set; } = true;
diff --git a/src/log4net/Filter/LevelRangeFilter.cs b/src/log4net/Filter/LevelRangeFilter.cs
index de6b9eb2..dc3104a3 100644
--- a/src/log4net/Filter/LevelRangeFilter.cs
+++ b/src/log4net/Filter/LevelRangeFilter.cs
@@ -34,7 +34,7 @@ namespace log4net.Filter;
/// <see cref="AcceptOnMatch"/>. If there is a match between the range
/// of priorities and the <see cref="Level"/> of the <see cref="LoggingEvent"/>, then the
/// <see cref="Decide"/> method returns <see cref="FilterDecision.Accept"/> in case the <see cref="AcceptOnMatch"/>
-/// option value is set to <c>true</c>, if it is <c>false</c>
+/// option value is set to <see langword="true"/>, if it is <see langword="false"/>
/// then <see cref="FilterDecision.Deny"/> is returned. If there is no match, <see cref="FilterDecision.Deny"/> is returned.
/// </para>
/// </remarks>
@@ -53,7 +53,7 @@ public class LevelRangeFilter : FilterSkeleton
/// logging event, otherwise it will <see cref="FilterDecision.Neutral"/> the event.
/// </para>
/// <para>
- /// The default is <c>true</c> i.e. to <see cref="FilterDecision.Accept"/> the event.
+ /// The default is <see langword="true"/> i.e. to <see cref="FilterDecision.Accept"/> the event.
/// </para>
/// </remarks>
public bool AcceptOnMatch { get; set; } = true;
diff --git a/src/log4net/Filter/LoggerMatchFilter.cs b/src/log4net/Filter/LoggerMatchFilter.cs
index 52e5c1a5..87e48ce5 100644
--- a/src/log4net/Filter/LoggerMatchFilter.cs
+++ b/src/log4net/Filter/LoggerMatchFilter.cs
@@ -34,8 +34,8 @@ namespace log4net.Filter;
/// <see cref="LoggingEvent.LoggerName"/> of the <see cref="LoggingEvent"/> starts
/// with the value of the <see cref="LoggerToMatch"/> option, then the
/// <see cref="Decide"/> method returns <see cref="FilterDecision.Accept"/> in
-/// case the <see cref="AcceptOnMatch"/> option value is set to <c>true</c>,
-/// if it is <c>false</c> then <see cref="FilterDecision.Deny"/> is returned.
+/// case the <see cref="AcceptOnMatch"/> option value is set to <see langword="true"/>,
+/// if it is <see langword="false"/> then <see cref="FilterDecision.Deny"/> is returned.
/// </para>
/// </remarks>
/// <author>Daniel Cazzulino</author>
@@ -52,7 +52,7 @@ public class LoggerMatchFilter : FilterSkeleton
/// logging event, otherwise it will <see cref="FilterDecision.Deny"/> the event.
/// </para>
/// <para>
- /// The default is <c>true</c> i.e. to <see cref="FilterDecision.Accept"/> the event.
+ /// The default is <see langword="true"/> i.e. to <see cref="FilterDecision.Accept"/> the event.
/// </para>
/// </remarks>
public bool AcceptOnMatch { get; set; } = true;
diff --git a/src/log4net/Filter/StringMatchFilter.cs b/src/log4net/Filter/StringMatchFilter.cs
index bbb12b3e..8458fc7e 100644
--- a/src/log4net/Filter/StringMatchFilter.cs
+++ b/src/log4net/Filter/StringMatchFilter.cs
@@ -73,7 +73,7 @@ public override void ActivateOptions()
/// logging event, otherwise it will <see cref="FilterDecision.Neutral"/> the event.
/// </para>
/// <para>
- /// The default is <c>true</c> i.e. to <see cref="FilterDecision.Accept"/> the event.
+ /// The default is <see langword="true"/> i.e. to <see cref="FilterDecision.Accept"/> the event.
/// </para>
/// </remarks>
public bool AcceptOnMatch { get; set; } = true;
diff --git a/src/log4net/GlobalContext.cs b/src/log4net/GlobalContext.cs
index 1ec153f0..01521752 100644
--- a/src/log4net/GlobalContext.cs
+++ b/src/log4net/GlobalContext.cs
@@ -26,7 +26,7 @@ namespace log4net;
/// </summary>
/// <remarks>
/// <para>
-/// The <c>GlobalContext</c> provides a location for global debugging
+/// The <see cref="GlobalContext"/> provides a location for global debugging
/// information to be stored.
/// </para>
/// <para>
diff --git a/src/log4net/ILog.cs b/src/log4net/ILog.cs
index 2e664676..5d172ecf 100644
--- a/src/log4net/ILog.cs
+++ b/src/log4net/ILog.cs
@@ -834,7 +834,7 @@ public interface ILog : ILoggerWrapper
/// Checks if this logger is enabled for the <see cref="Level.Debug"/> level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <see cref="Level.Debug"/> events, <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <see cref="Level.Debug"/> events, <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// <para>
@@ -905,7 +905,7 @@ public interface ILog : ILoggerWrapper
/// Checks if this logger is enabled for the <see cref="Level.Info"/> level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <see cref="Level.Info"/> events, <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <see cref="Level.Info"/> events, <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// For more information see <see cref="ILog.IsDebugEnabled"/>.
@@ -919,7 +919,7 @@ public interface ILog : ILoggerWrapper
/// Checks if this logger is enabled for the <see cref="Level.Warn"/> level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <see cref="Level.Warn"/> events, <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <see cref="Level.Warn"/> events, <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// For more information see <see cref="ILog.IsDebugEnabled"/>.
@@ -933,7 +933,7 @@ public interface ILog : ILoggerWrapper
/// Checks if this logger is enabled for the <see cref="Level.Error"/> level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <see cref="Level.Error"/> events, <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <see cref="Level.Error"/> events, <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// For more information see <see cref="ILog.IsDebugEnabled"/>.
@@ -947,7 +947,7 @@ public interface ILog : ILoggerWrapper
/// Checks if this logger is enabled for the <see cref="Level.Fatal"/> level.
/// </summary>
/// <value>
- /// <c>true</c> if this logger is enabled for <see cref="Level.Fatal"/> events, <c>false</c> otherwise.
+ /// <see langword="true"/> if this logger is enabled for <see cref="Level.Fatal"/> events, <see langword="false"/> otherwise.
/// </value>
/// <remarks>
/// For more information see <see cref="ILog.IsDebugEnabled"/>.
diff --git a/src/log4net/Layout/ILayout.cs b/src/log4net/Layout/ILayout.cs
index 381f28b0..c59b0080 100644
--- a/src/log4net/Layout/ILayout.cs
+++ b/src/log4net/Layout/ILayout.cs
@@ -105,13 +105,13 @@ public interface ILayout
/// <summary>
/// Flag indicating if this layout handle exceptions
/// </summary>
- /// <value><c>false</c> if this layout handles exceptions</value>
+ /// <value><see langword="false"/> if this layout handles exceptions</value>
/// <remarks>
/// <para>
/// If this layout handles the exception object contained within
/// <see cref="LoggingEvent"/>, then the layout should return
- /// <c>false</c>. Otherwise, if the layout ignores the exception
- /// object, then the layout should return <c>true</c>.
+ /// <see langword="false"/>. Otherwise, if the layout ignores the exception
+ /// object, then the layout should return <see langword="true"/>.
/// </para>
/// </remarks>
bool IgnoresException { get; }
diff --git a/src/log4net/Layout/LayoutSkeleton.cs b/src/log4net/Layout/LayoutSkeleton.cs
index d026a173..57a10f91 100644
--- a/src/log4net/Layout/LayoutSkeleton.cs
+++ b/src/log4net/Layout/LayoutSkeleton.cs
@@ -103,7 +103,7 @@ protected LayoutSkeleton()
/// </remarks>
public string Format(LoggingEvent loggingEvent)
{
- using var writer = new StringWriter(System.Globalization.CultureInfo.InvariantCulture);
+ using StringWriter writer = new(System.Globalization.CultureInfo.InvariantCulture);
Format(writer, loggingEvent);
return writer.ToString();
}
@@ -151,17 +151,17 @@ public string Format(LoggingEvent loggingEvent)
/// <summary>
/// Flag indicating if this layout handles exceptions.
/// </summary>
- /// <value><c>false</c> if this layout handles exceptions</value>
+ /// <value><see langword="false"/> if this layout handles exceptions</value>
/// <remarks>
/// <para>
/// If this layout handles the exception object contained within
/// <see cref="LoggingEvent"/>, then the layout should return
- /// <c>false</c>. Otherwise, if the layout ignores the exception
- /// object, then the layout should return <c>true</c>.
+ /// <see langword="false"/>. Otherwise, if the layout ignores the exception
+ /// object, then the layout should return <see langword="true"/>.
/// </para>
/// <para>
/// Set this value to override the default setting. The default
- /// value is <c>true</c>, this layout does not handle the exception.
+ /// value is <see langword="true"/>, this layout does not handle the exception.
/// </para>
/// </remarks>
public virtual bool IgnoresException { get; set; } = true;
diff --git a/src/log4net/Layout/Pattern/PatternLayoutConverter.cs b/src/log4net/Layout/Pattern/PatternLayoutConverter.cs
index 9e4163f7..b7218aff 100644
--- a/src/log4net/Layout/Pattern/PatternLayoutConverter.cs
+++ b/src/log4net/Layout/Pattern/PatternLayoutConverter.cs
@@ -47,17 +47,17 @@ protected PatternLayoutConverter()
/// <summary>
/// Flag indicating if this converter handles the logging event exception
/// </summary>
- /// <value><c>false</c> if this converter handles the logging event exception</value>
+ /// <value><see langword="false"/> if this converter handles the logging event exception</value>
/// <remarks>
/// <para>
/// If this converter handles the exception object contained within
/// <see cref="LoggingEvent"/>, then this property should be set to
- /// <c>false</c>. Otherwise, if the layout ignores the exception
- /// object, then the property should be set to <c>true</c>.
+ /// <see langword="false"/>. Otherwise, if the layout ignores the exception
+ /// object, then the property should be set to <see langword="true"/>.
/// </para>
/// <para>
/// Set this value to override a this default setting. The default
- /// value is <c>true</c>, this converter does not handle the exception.
+ /// value is <see langword="true"/>, this converter does not handle the exception.
/// </para>
/// </remarks>
public virtual bool IgnoresException { get; set; } = true;
diff --git a/src/log4net/Layout/Pattern/PropertyPatternConverter.cs b/src/log4net/Layout/Pattern/PropertyPatternConverter.cs
index e44cc93e..9382badf 100644
--- a/src/log4net/Layout/Pattern/PropertyPatternConverter.cs
+++ b/src/log4net/Layout/Pattern/PropertyPatternConverter.cs
@@ -34,7 +34,7 @@ namespace log4net.Layout.Pattern;
/// property.
/// </para>
/// <para>
-/// If the <see cref="Util.PatternConverter.Option"/> is set to <c>null</c>
+/// If the <see cref="Util.PatternConverter.Option"/> is set to <see langword="null"/>
/// then all the properties are written as key value pairs.
/// </para>
/// </remarks>
@@ -54,7 +54,7 @@ internal sealed class PropertyPatternConverter : PatternLayoutConverter
/// property.
/// </para>
/// <para>
- /// If the <see cref="Util.PatternConverter.Option"/> is set to <c>null</c>
+ /// If the <see cref="Util.PatternConverter.Option"/> is set to <see langword="null"/>
/// then all the properties are written as key value pairs.
/// </para>
/// </remarks>
diff --git a/src/log4net/Layout/RawLayoutConverter.cs b/src/log4net/Layout/RawLayoutConverter.cs
index df61ce3a..b2bb171f 100644
--- a/src/log4net/Layout/RawLayoutConverter.cs
+++ b/src/log4net/Layout/RawLayoutConverter.cs
@@ -40,7 +40,7 @@ public class RawLayoutConverter : IConvertFrom
/// Can the sourceType be converted to an <see cref="IRawLayout"/>
/// </summary>
/// <param name="sourceType">the source to be to be converted</param>
- /// <returns><c>true</c> if the source type can be converted to <see cref="IRawLayout"/></returns>
+ /// <returns><see langword="true"/> if the source type can be converted to <see cref="IRawLayout"/></returns>
/// <remarks>
/// <para>
/// Test if the <paramref name="sourceType"/> can be converted to a
diff --git a/src/log4net/Layout/RawPropertyLayout.cs b/src/log4net/Layout/RawPropertyLayout.cs
index 0a5f914c..cf06f6f1 100644
--- a/src/log4net/Layout/RawPropertyLayout.cs
+++ b/src/log4net/Layout/RawPropertyLayout.cs
@@ -42,7 +42,7 @@ public class RawPropertyLayout : IRawLayout
/// <para>
/// Looks up and returns the object value of the property
/// named <see cref="Key"/>. If there is no property defined
- /// with than name then <c>null</c> will be returned.
+ /// with than name then <see langword="null"/> will be returned.
/// </para>
/// </remarks>
public virtual object? Format(LoggingEvent loggingEvent)
diff --git a/src/log4net/Layout/XmlLayoutBase.cs b/src/log4net/Layout/XmlLayoutBase.cs
index 705ec671..3c63b5ae 100644
--- a/src/log4net/Layout/XmlLayoutBase.cs
+++ b/src/log4net/Layout/XmlLayoutBase.cs
@@ -61,7 +61,7 @@ public abstract class XmlLayoutBase : LayoutSkeleton
/// <para>
/// The <paramref name="locationInfo" /> parameter determines whether
/// location information will be output by the layout. If
- /// <paramref name="locationInfo" /> is set to <c>true</c>, then the
+ /// <paramref name="locationInfo" /> is set to <see langword="true"/>, then the
/// file name and line number of the statement at the origin of the log
/// statement will be output.
/// </para>
@@ -82,12 +82,12 @@ protected XmlLayoutBase(bool locationInfo)
/// the XML events.
/// </summary>
/// <value>
- /// <c>true</c> if location information should be included in the XML
- /// events; otherwise, <c>false</c>.
+ /// <see langword="true"/> if location information should be included in the XML
+ /// events; otherwise, <see langword="false"/>.
/// </value>
/// <remarks>
/// <para>
- /// If <see cref="LocationInfo" /> is set to <c>true</c>, then the file
+ /// If <see cref="LocationInfo" /> is set to <see langword="true"/>, then the file
/// name and line number of the statement at the origin of the log
/// statement will be output.
/// </para>
diff --git a/src/log4net/LogManager.cs b/src/log4net/LogManager.cs
index a4188d7a..2538b775 100644
--- a/src/log4net/LogManager.cs
+++ b/src/log4net/LogManager.cs
@@ -66,11 +66,11 @@ public static class LogManager
/// <remarks>
/// <para>
/// If the named logger exists (in the default repository) then it
- /// returns a reference to the logger, otherwise it returns <c>null</c>.
+ /// returns a reference to the logger, otherwise it returns <see langword="null"/>.
/// </para>
/// </remarks>
/// <param name="name">The fully qualified logger name to look for.</param>
- /// <returns>The logger found, or <c>null</c> if no logger could be found.</returns>
+ /// <returns>The logger found, or <see langword="null"/> if no logger could be found.</returns>
public static ILog? Exists(string name) => Exists(Assembly.GetCallingAssembly(), name);
/// <overloads>Get the currently defined loggers.</overloads>
@@ -110,13 +110,13 @@ public static class LogManager
/// <para>
/// If the named logger exists (in the specified repository) then it
/// returns a reference to the logger, otherwise it returns
- /// <c>null</c>.
+ /// <see langword="null"/>.
/// </para>
/// </remarks>
/// <param name="repository">The repository to lookup in.</param>
/// <param name="name">The fully qualified logger name to look for.</param>
/// <returns>
- /// The logger found, or <c>null</c> if the logger doesn't exist in the specified
+ /// The logger found, or <see langword="null"/> if the logger doesn't exist in the specified
/// repository.
/// </returns>
public static ILog? Exists(string repository, string name) => WrapLogger(LoggerManager.Exists(repository, name));
@@ -128,13 +128,13 @@ public static class LogManager
/// <para>
/// If the named logger exists (in the repository for the specified assembly) then it
/// returns a reference to the logger, otherwise it returns
- /// <c>null</c>.
+ /// <see langword="null"/>.
/// </para>
/// </remarks>
/// <param name="repositoryAssembly">The assembly to use to look up the repository.</param>
/// <param name="name">The fully qualified logger name to look for.</param>
/// <returns>
- /// The logger, or <c>null</c> if the logger doesn't exist in the specified
+ /// The logger, or <see langword="null"/> if the logger doesn't exist in the specified
/// assembly's repository.
/// </returns>
public static ILog? Exists(Assembly repositoryAssembly, string name) => WrapLogger(LoggerManager.Exists(repositoryAssembly, name));
@@ -333,8 +333,8 @@ public static ILog GetLogger(Assembly repositoryAssembly, Type type)
/// <para>
/// Resets all values contained in the repository instance to their
/// defaults. This removes all appenders from all loggers, sets
- /// the level of all non-root loggers to <c>null</c>,
- /// sets their additivity flag to <c>true</c> and sets the level
+ /// the level of all non-root loggers to <see langword="null"/>,
+ /// sets their additivity flag to <see langword="true"/> and sets the level
/// of the root logger to <see cref="Level.Debug"/>. Moreover,
/// message disabling is set to its default "off" value.
/// </para>
@@ -348,8 +348,8 @@ public static ILog GetLogger(Assembly repositoryAssembly, Type type)
/// <para>
/// Reset all values contained in the repository instance to their
/// defaults. This removes all appenders from all loggers, sets
- /// the level of all non-root loggers to <c>null</c>,
- /// sets their additivity flag to <c>true</c> and sets the level
+ /// the level of all non-root loggers to <see langword="null"/>,
+ /// sets their additivity flag to <see langword="true"/> and sets the level
/// of the root logger to <see cref="Level.Debug"/>. Moreover,
/// message disabling is set to its default "off" value.
/// </para>
@@ -364,8 +364,8 @@ public static ILog GetLogger(Assembly repositoryAssembly, Type type)
/// <para>
/// Reset all values contained in the repository instance to their
/// defaults. This removes all appenders from all loggers, sets
- /// the level of all non-root loggers to <c>null</c>,
- /// sets their additivity flag to <c>true</c> and sets the level
+ /// the level of all non-root loggers to <see langword="null"/>,
+ /// sets their additivity flag to <see langword="true"/> and sets the level
/// of the root logger to <see cref="Level.Debug"/>. Moreover,
/// message disabling is set to its default "off" value.
/// </para>
@@ -496,7 +496,7 @@ public static ILog GetLogger(Assembly repositoryAssembly, Type type)
/// Flushes logging events buffered in all configured appenders in the default repository.
/// </summary>
/// <param name="millisecondsTimeout">The maximum time in milliseconds to wait for logging events from asynchronous appenders to be flushed.</param>
- /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if all logging events were flushed successfully, else <see langword="false"/>.</returns>
public static bool Flush(int millisecondsTimeout)
{
if (LoggerManager.GetRepository(Assembly.GetCallingAssembly()) is not IFlushable flushableRepository)
@@ -522,7 +522,7 @@ public static bool Flush(int millisecondsTimeout)
/// <returns>The wrapper objects for the loggers specified.</returns>
private static ILog[] WrapLoggers(ILogger[] loggers)
{
- var results = new ILog[loggers.Length];
+ ILog[] results = new ILog[loggers.Length];
for (int i = 0; i < loggers.Length; i++)
{
results[i] = WrapLogger(loggers[i]);
diff --git a/src/log4net/LogicalThreadContext.cs b/src/log4net/LogicalThreadContext.cs
index f0b26fa7..13e7e1de 100644
--- a/src/log4net/LogicalThreadContext.cs
+++ b/src/log4net/LogicalThreadContext.cs
@@ -32,9 +32,9 @@ namespace log4net;
/// </summary>
/// <remarks>
/// <para>
-/// The <c>LogicalThreadContext</c> provides a location for <see cref="CallContext"/> specific debugging
+/// The <see cref="LogicalThreadContext"/> provides a location for <see cref="CallContext"/> specific debugging
/// information to be stored.
-/// The <c>LogicalThreadContext</c> properties override any <see cref="ThreadContext"/> or <see cref="GlobalContext"/>
+/// The <see cref="LogicalThreadContext"/> properties override any <see cref="ThreadContext"/> or <see cref="GlobalContext"/>
/// properties with the same name.
/// </para>
/// <para>
@@ -87,7 +87,7 @@ public static class LogicalThreadContext
/// </summary>
/// <remarks>
/// <para>
- /// The <c>LogicalThreadContext</c> properties override any <see cref="ThreadContext"/>
+ /// The <see cref="LogicalThreadContext"/> properties override any <see cref="ThreadContext"/>
/// or <see cref="GlobalContext"/> properties with the same name.
/// </para>
/// </remarks>
diff --git a/src/log4net/MDC.cs b/src/log4net/MDC.cs
index ba27661b..edc67a85 100644
--- a/src/log4net/MDC.cs
+++ b/src/log4net/MDC.cs
@@ -51,7 +51,7 @@ public static class MDC
/// Gets the context value identified by the <paramref name="key" /> parameter.
/// </summary>
/// <param name="key">The key to lookup in the MDC.</param>
- /// <returns>The string value held for the key, or a <c>null</c> reference if no corresponding value is found.</returns>
+ /// <returns>The string value held for the key, or a <see langword="null"/> reference if no corresponding value is found.</returns>
/// <remarks>
/// <note>
/// <para>
@@ -61,7 +61,7 @@ public static class MDC
/// </note>
/// <para>
/// If the <paramref name="key" /> parameter does not look up to a
- /// previously defined context then <c>null</c> will be returned.
+ /// previously defined context then <see langword="null"/> will be returned.
/// </para>
/// </remarks>
/*[Obsolete("MDC has been replaced by ThreadContext.Properties")]*/
@@ -87,7 +87,7 @@ public static class MDC
/// <para>
/// If a value is already defined for the <paramref name="key" />
/// specified then the value will be replaced. If the <paramref name="value" />
- /// is specified as <c>null</c> then the key value mapping will be removed.
+ /// is specified as <see langword="null"/> then the key value mapping will be removed.
/// </para>
/// </remarks>
/*[Obsolete("MDC has been replaced by ThreadContext.Properties")]*/
diff --git a/src/log4net/NDC.cs b/src/log4net/NDC.cs
index ccc1502a..57d3eb37 100644
--- a/src/log4net/NDC.cs
+++ b/src/log4net/NDC.cs
@@ -165,7 +165,7 @@ public static class NDC
/// <para>
/// Remove the top context from the stack, and return
/// it to the caller. If the stack is empty then an
- /// empty string (not <c>null</c>) is returned.
+ /// empty string (not <see langword="null"/>) is returned.
/// </para>
/// </remarks>
/*[Obsolete("NDC has been replaced by ThreadContext.Stacks")]*/
@@ -189,11 +189,11 @@ public static class NDC
/// <para>
/// Pushes a new context onto the context stack. An <see cref="IDisposable"/>
/// is returned that can be used to clean up the context stack. This
- /// can be easily combined with the <c>using</c> keyword to scope the
+ /// can be easily combined with the <see langword="using"/> keyword to scope the
/// context.
/// </para>
/// </remarks>
- /// <example>Simple example of using the <c>Push</c> method with the <c>using</c> keyword.
+ /// <example>Simple example of using the <see cref="Push"/> method with the <see langword="using"/> keyword.
/// <code lang="C#">
/// using(log4net.NDC.Push("NDC_Message"))
/// {
@@ -223,11 +223,11 @@ public static class NDC
/// <para>
/// Pushes a new context onto the context stack. An <see cref="IDisposable"/>
/// is returned that can be used to clean up the context stack. This
- /// can be easily combined with the <c>using</c> keyword to scope the
+ /// can be easily combined with the <see langword="using"/> keyword to scope the
/// context.
/// </para>
/// </remarks>
- /// <example>Simple example of using the <c>Push</c> method with the <c>using</c> keyword.
+ /// <example>Simple example of using the <see cref="Push"/> method with the <see langword="using"/> keyword.
/// <code lang="C#">
/// var someValue = "ExampleContext"
/// using(log4net.NDC.PushFormat("NDC_Message {0}", someValue))
diff --git a/src/log4net/ObjectRenderer/DefaultRenderer.cs b/src/log4net/ObjectRenderer/DefaultRenderer.cs
index 62cd98c7..2dbfc8d1 100644
--- a/src/log4net/ObjectRenderer/DefaultRenderer.cs
+++ b/src/log4net/ObjectRenderer/DefaultRenderer.cs
@@ -66,7 +66,7 @@ public sealed class DefaultRenderer : IObjectRenderer
/// <description>Rendered String</description>
/// </listheader>
/// <item>
- /// <term><c>null</c></term>
+ /// <term><see langword="null"/></term>
/// <description>
/// <para>"(null)"</para>
/// </description>
diff --git a/src/log4net/ObjectRenderer/RendererMap.cs b/src/log4net/ObjectRenderer/RendererMap.cs
index e005a96b..7d365734 100644
--- a/src/log4net/ObjectRenderer/RendererMap.cs
+++ b/src/log4net/ObjectRenderer/RendererMap.cs
@@ -31,7 +31,7 @@ namespace log4net.ObjectRenderer;
/// <remarks>
/// <para>
/// The <see cref="FindAndRender(object)"/> method is used to render an
-/// <c>object</c> using the appropriate renderers defined in this map,
+/// <see langword="object"/> using the appropriate renderers defined in this map,
/// using a default renderer if no custom renderer is defined for a type.
/// </para>
/// </remarks>
@@ -189,7 +189,7 @@ public IObjectRenderer Get(Type type)
/// Recursively searches interfaces.
/// </summary>
/// <param name="type">The type for which to look up the renderer.</param>
- /// <returns>The renderer for the specified type, or <c>null</c> if not found.</returns>
+ /// <returns>The renderer for the specified type, or <see langword="null"/> if not found.</returns>
private IObjectRenderer? SearchTypeAndInterfaces(Type type)
{
if (_map.TryGetValue(type, out IObjectRenderer? r))
diff --git a/src/log4net/Plugin/PluginCollection.cs b/src/log4net/Plugin/PluginCollection.cs
index bd87fe51..b836f9b5 100644
--- a/src/log4net/Plugin/PluginCollection.cs
+++ b/src/log4net/Plugin/PluginCollection.cs
@@ -45,8 +45,8 @@ public interface IPluginCollectionEnumerator
/// Advances the enumerator to the next element in the collection.
/// </summary>
/// <returns>
- /// <c>true</c> if the enumerator was successfully advanced to the next element;
- /// <c>false</c> if the enumerator has passed the end of the collection.
+ /// <see langword="true"/> if the enumerator was successfully advanced to the next element;
+ /// <see langword="false"/> if the enumerator has passed the end of the collection.
/// </returns>
/// <exception cref="InvalidOperationException">
/// The collection was modified after the enumerator was created.
@@ -66,35 +66,35 @@ public interface IPluginCollectionEnumerator
private int _version;
/// <summary>
- /// Creates a read-only wrapper for a <c>PluginCollection</c> instance.
+ /// Creates a read-only wrapper for a <see cref="PluginCollection"/> instance.
/// </summary>
/// <param name="list">list to create a readonly wrapper arround</param>
/// <returns>
- /// A <c>PluginCollection</c> wrapper that is read-only.
+ /// A <see cref="PluginCollection"/> wrapper that is read-only.
/// </returns>
public static PluginCollection ReadOnly(PluginCollection list)
=> new ReadOnlyPluginCollection(list.EnsureNotNull());
/// <summary>
- /// Initializes a new instance of the <c>PluginCollection</c> class
+ /// Initializes a new instance of the <see cref="PluginCollection"/> class
/// that is empty and has the default initial capacity.
/// </summary>
public PluginCollection() => _array = new IPlugin[DefaultCapacity];
/// <summary>
- /// Initializes a new instance of the <c>PluginCollection</c> class
+ /// Initializes a new instance of the <see cref="PluginCollection"/> class
/// that has the specified initial capacity.
/// </summary>
/// <param name="capacity">
- /// The number of elements that the new <c>PluginCollection</c> is initially capable of storing.
+ /// The number of elements that the new <see cref="PluginCollection"/> is initially capable of storing.
/// </param>
public PluginCollection(int capacity) => _array = new IPlugin[capacity];
/// <summary>
- /// Initializes a new instance of the <c>PluginCollection</c> class
- /// that contains elements copied from the specified <c>PluginCollection</c>.
+ /// Initializes a new instance of the <see cref="PluginCollection"/> class
+ /// that contains elements copied from the specified <see cref="PluginCollection"/>.
/// </summary>
- /// <param name="collection">The <c>PluginCollection</c> whose elements are copied to the new collection.</param>
+ /// <param name="collection">The <see cref="PluginCollection"/> whose elements are copied to the new collection.</param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2214:Do not call overridable methods in constructors")]
public PluginCollection(PluginCollection collection)
{
@@ -103,7 +103,7 @@ public PluginCollection(PluginCollection collection)
}
/// <summary>
- /// Initializes a new instance of the <c>PluginCollection</c> class
+ /// Initializes a new instance of the <see cref="PluginCollection"/> class
/// that contains elements copied from the specified <see cref="IPlugin"/> array.
/// </summary>
/// <param name="array">The <see cref="IPlugin"/> array whose elements are copied to the new list.</param>
@@ -115,7 +115,7 @@ public PluginCollection(IPlugin[] array)
}
/// <summary>
- /// Initializes a new instance of the <c>PluginCollection</c> class
+ /// Initializes a new instance of the <see cref="PluginCollection"/> class
/// that contains elements copied from the specified <see cref="IPlugin"/> collection.
/// </summary>
/// <param name="collection">The <see cref="IPlugin"/> collection whose elements are copied to the new list.</param>
@@ -127,7 +127,7 @@ public PluginCollection(ICollection collection)
}
/// <summary>
- /// Initializes a new instance of the <c>PluginCollection</c> class
+ /// Initializes a new instance of the <see cref="PluginCollection"/> class
/// that contains elements copied from the specified <see cref="IPlugin"/> collection.
/// </summary>
/// <param name="collection">The <see cref="IPlugin"/> collection whose elements are copied to the new list.</param>
@@ -158,19 +158,19 @@ protected internal enum Tag
protected internal PluginCollection(Tag _) => _array = Array.Empty<IPlugin>();
/// <summary>
- /// Gets the number of elements actually contained in the <c>PluginCollection</c>.
+ /// Gets the number of elements actually contained in the <see cref="PluginCollection"/>.
/// </summary>
public virtual int Count => _count;
/// <summary>
- /// Copies the entire <c>PluginCollection</c> to a one-dimensional
+ /// Copies the entire <see cref="PluginCollection"/> to a one-dimensional
/// <see cref="IPlugin"/> array.
/// </summary>
/// <param name="array">The one-dimensional <see cref="IPlugin"/> array to copy to.</param>
public virtual void CopyTo(IPlugin[] array) => CopyTo(array, 0);
/// <summary>
- /// Copies the entire <c>PluginCollection</c> to a one-dimensional
+ /// Copies the entire <see cref="PluginCollection"/> to a one-dimensional
/// <see cref="IPlugin"/> array, starting at the specified index of the target array.
/// </summary>
/// <param name="array">The one-dimensional <see cref="IPlugin"/> array to copy to.</param>
@@ -224,9 +224,9 @@ public virtual void CopyTo(IPlugin[] array, int start)
}
/// <summary>
- /// Adds a <see cref="IPlugin"/> to the end of the <c>PluginCollection</c>.
+ /// Adds a <see cref="IPlugin"/> to the end of the <see cref="PluginCollection"/>.
/// </summary>
- /// <param name="item">The <see cref="IPlugin"/> to be added to the end of the <c>PluginCollection</c>.</param>
+ /// <param name="item">The <see cref="IPlugin"/> to be added to the end of the <see cref="PluginCollection"/>.</param>
/// <returns>The index at which the value has been added.</returns>
public virtual int Add(IPlugin item)
{
@@ -242,7 +242,7 @@ public virtual int Add(IPlugin item)
}
/// <summary>
- /// Removes all elements from the <c>PluginCollection</c>.
+ /// Removes all elements from the <see cref="PluginCollection"/>.
/// </summary>
public virtual void Clear()
{
@@ -257,7 +257,7 @@ public virtual void Clear()
/// <returns>A new <see cref="PluginCollection"/> with a shallow copy of the collection data.</returns>
public virtual object Clone()
{
- var newCol = new PluginCollection(_count);
+ PluginCollection newCol = new(_count);
Array.Copy(_array, 0, newCol._array, 0, _count);
newCol._count = _count;
newCol._version = _version;
@@ -266,10 +266,10 @@ public virtual object Clone()
}
/// <summary>
- /// Determines whether a given <see cref="IPlugin"/> is in the <c>PluginCollection</c>.
+ /// Determines whether a given <see cref="IPlugin"/> is in the <see cref="PluginCollection"/>.
/// </summary>
/// <param name="item">The <see cref="IPlugin"/> to check for.</param>
- /// <returns><c>true</c> if <paramref name="item"/> is found in the <c>PluginCollection</c>; otherwise, <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if <paramref name="item"/> is found in the <see cref="PluginCollection"/>; otherwise, <see langword="false"/>.</returns>
public virtual bool Contains(IPlugin item)
{
for (int i = 0; i != _count; ++i)
@@ -284,12 +284,12 @@ public virtual bool Contains(IPlugin item)
/// <summary>
/// Returns the zero-based index of the first occurrence of a <see cref="IPlugin"/>
- /// in the <c>PluginCollection</c>.
+ /// in the <see cref="PluginCollection"/>.
/// </summary>
- /// <param name="item">The <see cref="IPlugin"/> to locate in the <c>PluginCollection</c>.</param>
+ /// <param name="item">The <see cref="IPlugin"/> to locate in the <see cref="PluginCollection"/>.</param>
/// <returns>
/// The zero-based index of the first occurrence of <paramref name="item"/>
- /// in the entire <c>PluginCollection</c>, if found; otherwise, -1.
+ /// in the entire <see cref="PluginCollection"/>, if found; otherwise, -1.
/// </returns>
public virtual int IndexOf(IPlugin item)
{
@@ -304,7 +304,7 @@ public virtual int IndexOf(IPlugin item)
}
/// <summary>
- /// Inserts an element into the <c>PluginCollection</c> at the specified index.
+ /// Inserts an element into the <see cref="PluginCollection"/> at the specified index.
/// </summary>
/// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
/// <param name="item">The <see cref="IPlugin"/> to insert.</param>
@@ -333,11 +333,11 @@ public virtual void Insert(int index, IPlugin item)
}
/// <summary>
- /// Removes the first occurrence of a specific <see cref="IPlugin"/> from the <c>PluginCollection</c>.
+ /// Removes the first occurrence of a specific <see cref="IPlugin"/> from the <see cref="PluginCollection"/>.
/// </summary>
- /// <param name="item">The <see cref="IPlugin"/> to remove from the <c>PluginCollection</c>.</param>
+ /// <param name="item">The <see cref="IPlugin"/> to remove from the <see cref="PluginCollection"/>.</param>
/// <exception cref="ArgumentException">
- /// The specified <see cref="IPlugin"/> was not found in the <c>PluginCollection</c>.
+ /// The specified <see cref="IPlugin"/> was not found in the <see cref="PluginCollection"/>.
/// </exception>
public virtual void Remove(IPlugin item)
{
@@ -351,7 +351,7 @@ public virtual void Remove(IPlugin item)
}
/// <summary>
- /// Removes the element at the specified index of the <c>PluginCollection</c>.
+ /// Removes the element at the specified index of the <see cref="PluginCollection"/>.
/// </summary>
/// <param name="index">The zero-based index of the element to remove.</param>
/// <exception cref="ArgumentOutOfRangeException">
@@ -381,26 +381,26 @@ public virtual void RemoveAt(int index)
/// <summary>
/// Gets a value indicating whether the collection has a fixed size.
/// </summary>
- /// <value><c>true</c> if the collection has a fixed size; otherwise, <c>false</c>. The default is <c>false</c>.</value>
+ /// <value><see langword="true"/> if the collection has a fixed size; otherwise, <see langword="false"/>. The default is <see langword="false"/>.</value>
public virtual bool IsFixedSize => false;
/// <summary>
/// Gets a value indicating whether the IList is read-only.
/// </summary>
- /// <value><c>true</c> if the collection is read-only; otherwise, <c>false</c>. The default is <c>false</c>.</value>
+ /// <value><see langword="true"/> if the collection is read-only; otherwise, <see langword="false"/>. The default is <see langword="false"/>.</value>
public virtual bool IsReadOnly => false;
/// <summary>
- /// Returns an enumerator that can iterate through the <c>PluginCollection</c>.
+ /// Returns an enumerator that can iterate through the <see cref="PluginCollection"/>.
/// </summary>
- /// <returns>An <see cref="Enumerator"/> for the entire <c>PluginCollection</c>.</returns>
+ /// <returns>An <see cref="Enumerator"/> for the entire <see cref="PluginCollection"/>.</returns>
public virtual IPluginCollectionEnumerator GetEnumerator() => new Enumerator(this);
/// <summary>
- /// Gets or sets the number of elements the <c>PluginCollection</c> can contain.
+ /// Gets or sets the number of elements the <see cref="PluginCollection"/> can contain.
/// </summary>
/// <value>
- /// The number of elements the <c>PluginCollection</c> can contain.
+ /// The number of elements the <see cref="PluginCollection"/> can contain.
/// </value>
public virtual int Capacity
{
@@ -429,10 +429,10 @@ public virtual int Capacity
}
/// <summary>
- /// Adds the elements of another <c>PluginCollection</c> to the current <c>PluginCollection</c>.
+ /// Adds the elements of another <see cref="PluginCollection"/> to the current <see cref="PluginCollection"/>.
/// </summary>
- /// <param name="collection">The <c>PluginCollection</c> whose elements should be added to the end of the current <c>PluginCollection</c>.</param>
- /// <returns>The new <see cref="Count"/> of the <c>PluginCollection</c>.</returns>
+ /// <param name="collection">The <see cref="PluginCollection"/> whose elements should be added to the end of the current <see cref="PluginCollection"/>.</param>
+ /// <returns>The new <see cref="Count"/> of the <see cref="PluginCollection"/>.</returns>
public virtual int AddRange(PluginCollection collection)
{
if (_count + collection.EnsureNotNull().Count >= _array.Length)
@@ -448,10 +448,10 @@ public virtual int AddRange(PluginCollection collection)
}
/// <summary>
- /// Adds the elements of a <see cref="IPlugin"/> array to the current <c>PluginCollection</c>.
+ /// Adds the elements of a <see cref="IPlugin"/> array to the current <see cref="PluginCollection"/>.
/// </summary>
- /// <param name="array">The <see cref="IPlugin"/> array whose elements should be added to the end of the <c>PluginCollection</c>.</param>
- /// <returns>The new <see cref="Count"/> of the <c>PluginCollection</c>.</returns>
+ /// <param name="array">The <see cref="IPlugin"/> array whose elements should be added to the end of the <see cref="PluginCollection"/>.</param>
+ /// <returns>The new <see cref="Count"/> of the <see cref="PluginCollection"/>.</returns>
public virtual int AddRange(IPlugin[] array)
{
if (_count + array.EnsureNotNull().Length >= _array.Length)
@@ -467,10 +467,10 @@ public virtual int AddRange(IPlugin[] array)
}
/// <summary>
- /// Adds the elements of a <see cref="IPlugin"/> collection to the current <c>PluginCollection</c>.
+ /// Adds the elements of a <see cref="IPlugin"/> collection to the current <see cref="PluginCollection"/>.
/// </summary>
- /// <param name="collection">The <see cref="IPlugin"/> collection whose elements should be added to the end of the <c>PluginCollection</c>.</param>
- /// <returns>The new <see cref="Count"/> of the <c>PluginCollection</c>.</returns>
+ /// <param name="collection">The <see cref="IPlugin"/> collection whose elements should be added to the end of the <see cref="PluginCollection"/>.</param>
+ /// <returns>The new <see cref="Count"/> of the <see cref="PluginCollection"/>.</returns>
public virtual int AddRange(ICollection collection)
{
if (_count + collection.EnsureNotNull().Count >= _array.Length)
@@ -487,10 +487,10 @@ public virtual int AddRange(ICollection collection)
}
/// <summary>
- /// Adds the elements of a <see cref="IPlugin"/> collection to the current <c>PluginCollection</c>.
+ /// Adds the elements of a <see cref="IPlugin"/> collection to the current <see cref="PluginCollection"/>.
/// </summary>
- /// <param name="collection">The <see cref="IPlugin"/> collection whose elements should be added to the end of the <c>PluginCollection</c>.</param>
- /// <returns>The new <see cref="Count"/> of the <c>PluginCollection</c>.</returns>
+ /// <param name="collection">The <see cref="IPlugin"/> collection whose elements should be added to the end of the <see cref="PluginCollection"/>.</param>
+ /// <returns>The new <see cref="Count"/> of the <see cref="PluginCollection"/>.</returns>
public virtual int AddRange(ICollection<IPlugin> collection)
{
if (_count + collection.EnsureNotNull().Count >= _array.Length)
@@ -576,7 +576,7 @@ private sealed class Enumerator : IEnumerator, IPluginCollectionEnumerator
private readonly int _version;
/// <summary>
- /// Initializes a new instance of the <c>Enumerator</c> class.
+ /// Initializes a new instance of the <see cref="Enumerator"/> class.
/// </summary>
/// <param name="tc"></param>
internal Enumerator(PluginCollection tc)
@@ -595,8 +595,8 @@ internal Enumerator(PluginCollection tc)
/// Advances the enumerator to the next element in the collection.
/// </summary>
/// <returns>
- /// <c>true</c> if the enumerator was successfully advanced to the next element;
- /// <c>false</c> if the enumerator has passed the end of the collection.
+ /// <see langword="true"/> if the enumerator was successfully advanced to the next element;
+ /// <see langword="false"/> if the enumerator has passed the end of the collection.
/// </returns>
/// <exception cref="InvalidOperationException">
/// The collection was modified after the enumerator was created.
diff --git a/src/log4net/Plugin/PluginMap.cs b/src/log4net/Plugin/PluginMap.cs
index 2fdf58a3..eb1cda27 100644
--- a/src/log4net/Plugin/PluginMap.cs
+++ b/src/log4net/Plugin/PluginMap.cs
@@ -44,7 +44,7 @@ public sealed class PluginMap(ILoggerRepository repository)
/// <param name="name">The name of the <see cref="IPlugin" /> to lookup.</param>
/// <returns>
/// The <see cref="IPlugin" /> from the map with the name specified, or
- /// <c>null</c> if no plugin is found.
+ /// <see langword="null"/> if no plugin is found.
/// </returns>
public IPlugin? this[string name]
{
diff --git a/src/log4net/Repository/Hierarchy/DefaultLoggerFactory.cs b/src/log4net/Repository/Hierarchy/DefaultLoggerFactory.cs
index 60ea16c6..a5d7b598 100644
--- a/src/log4net/Repository/Hierarchy/DefaultLoggerFactory.cs
+++ b/src/log4net/Repository/Hierarchy/DefaultLoggerFactory.cs
@@ -39,7 +39,7 @@ internal sealed class DefaultLoggerFactory : ILoggerFactory
/// Create a new <see cref="Logger" /> instance with the specified name.
/// </summary>
/// <param name="repository">The <see cref="ILoggerRepository" /> that will own the <see cref="Logger" />.</param>
- /// <param name="name">The name of the <see cref="Logger" />. If <c>null</c>, the root logger is returned.</param>
+ /// <param name="name">The name of the <see cref="Logger" />. If <see langword="null"/>, the root logger is returned.</param>
/// <returns>The <see cref="Logger" /> instance for the specified name.</returns>
/// <remarks>
/// <para>
diff --git a/src/log4net/Repository/Hierarchy/ILoggerFactory.cs b/src/log4net/Repository/Hierarchy/ILoggerFactory.cs
index 27cdb245..79f277a2 100644
--- a/src/log4net/Repository/Hierarchy/ILoggerFactory.cs
+++ b/src/log4net/Repository/Hierarchy/ILoggerFactory.cs
@@ -55,7 +55,7 @@ public interface ILoggerFactory
/// new named <see cref="Logger"/> instances.
/// </para>
/// <para>
- /// If the <paramref name="name"/> is <c>null</c> then the root logger
+ /// If the <paramref name="name"/> is <see langword="null"/> then the root logger
/// must be returned.
/// </para>
/// </remarks>
diff --git a/src/log4net/Repository/Hierarchy/RootLogger.cs b/src/log4net/Repository/Hierarchy/RootLogger.cs
index a32e8cea..6681af2a 100644
--- a/src/log4net/Repository/Hierarchy/RootLogger.cs
+++ b/src/log4net/Repository/Hierarchy/RootLogger.cs
@@ -33,7 +33,7 @@ namespace log4net.Repository.Hierarchy;
/// that it provides several guarantees.
/// </para>
/// <para>
-/// First, it cannot be assigned a <c>null</c>
+/// First, it cannot be assigned a <see langword="null"/>
/// level. Second, since the root logger cannot have a parent, the
/// <see cref="EffectiveLevel"/> property always returns the value of the
/// level field without walking the hierarchy.
@@ -69,7 +69,7 @@ public RootLogger(Level level) : base("root")
/// <remarks>
/// <para>
/// Because the root logger cannot have a parent and its level
- /// must not be <c>null</c> this property just returns the
+ /// must not be <see langword="null"/> this property just returns the
/// value of <see cref="Logger.Level"/>.
/// </para>
/// </remarks>
@@ -83,7 +83,7 @@ public RootLogger(Level level) : base("root")
/// </value>
/// <remarks>
/// <para>
- /// Setting the level of the root logger to a <c>null</c> reference
+ /// Setting the level of the root logger to a <see langword="null"/> reference
/// may have catastrophic results. We prevent this here.
/// </para>
/// </remarks>
diff --git a/src/log4net/Repository/Hierarchy/XmlHierarchyConfigurator.cs b/src/log4net/Repository/Hierarchy/XmlHierarchyConfigurator.cs
index 1ec9c1a9..0e2f45eb 100644
--- a/src/log4net/Repository/Hierarchy/XmlHierarchyConfigurator.cs
+++ b/src/log4net/Repository/Hierarchy/XmlHierarchyConfigurator.cs
@@ -258,7 +258,7 @@ public void Configure(XmlElement? element)
/// Parses an appender element.
/// </summary>
/// <param name="appenderElement">The appender element.</param>
- /// <returns>The appender instance or <c>null</c> when parsing failed.</returns>
+ /// <returns>The appender instance or <see langword="null"/> when parsing failed.</returns>
/// <remarks>
/// <para>
/// Parse an XML element that represents an appender and return
@@ -777,7 +777,7 @@ protected void SetParameter(XmlElement element, object target)
/// Test if an element has no attributes or child elements
/// </summary>
/// <param name="element">the element to inspect</param>
- /// <returns><c>true</c> if the element has any attributes or child elements, <c>false</c> otherwise</returns>
+ /// <returns><see langword="true"/> if the element has any attributes or child elements, <see langword="false"/> otherwise</returns>
private static bool HasAttributesOrElements(XmlElement element)
=> element.ChildNodes.OfType<XmlNode>().Any(node => node.NodeType is XmlNodeType.Attribute or XmlNodeType.Element);
@@ -785,7 +785,7 @@ private static bool HasAttributesOrElements(XmlElement element)
/// Test if a <see cref="Type"/> is constructible with <c>Activator.CreateInstance</c>.
/// </summary>
/// <param name="type">the type to inspect</param>
- /// <returns><c>true</c> if the type is creatable using a default constructor, <c>false</c> otherwise</returns>
+ /// <returns><see langword="true"/> if the type is creatable using a default constructor, <see langword="false"/> otherwise</returns>
private static bool IsTypeConstructible(Type type)
{
return type.IsClass && !type.IsAbstract
@@ -844,7 +844,7 @@ private static bool IsTypeConstructible(Type type)
/// <returns>
/// <para>
/// An object of type <paramref name="type"/> with value <paramref name="value"/> or
- /// <c>null</c> when the conversion could not be performed.
+ /// <see langword="null"/> when the conversion could not be performed.
/// </para>
/// </returns>
protected object? ConvertStringTo(Type type, string value)
@@ -871,7 +871,7 @@ private static bool IsTypeConstructible(Type type)
/// <param name="element">The XML element that contains the definition of the object.</param>
/// <param name="defaultTargetType">The object type to use if not explicitly specified.</param>
/// <param name="typeConstraint">The type that the returned object must be or must inherit from.</param>
- /// <returns>The object or <c>null</c></returns>
+ /// <returns>The object or <see langword="null"/></returns>
/// <remarks>
/// <para>
/// Parse an XML element and create an object instance based on the configuration
diff --git a/src/log4net/Repository/ILoggerRepository.cs b/src/log4net/Repository/ILoggerRepository.cs
index 0614e393..1f99ae14 100644
--- a/src/log4net/Repository/ILoggerRepository.cs
+++ b/src/log4net/Repository/ILoggerRepository.cs
@@ -88,10 +88,10 @@ public interface ILoggerRepository
Level Threshold { get; set; }
/// <summary>
- /// Gets the named logger, or <c>null</c>.
+ /// Gets the named logger, or <see langword="null"/>.
/// </summary>
/// <param name="name">The name of the logger to look up.</param>
- /// <returns>The logger if found, or <c>null</c>.</returns>
+ /// <returns>The logger if found, or <see langword="null"/>.</returns>
ILogger? Exists(string name);
/// <summary>
diff --git a/src/log4net/Repository/LoggerRepositorySkeleton.cs b/src/log4net/Repository/LoggerRepositorySkeleton.cs
index 94b16149..ce142330 100644
--- a/src/log4net/Repository/LoggerRepositorySkeleton.cs
+++ b/src/log4net/Repository/LoggerRepositorySkeleton.cs
@@ -176,7 +176,7 @@ public virtual Level Threshold
/// <remarks>
/// <para>
/// Check if the named logger exists in the repository. If so return
- /// its reference, otherwise returns <c>null</c>.
+ /// its reference, otherwise returns <see langword="null"/>.
/// </para>
/// </remarks>
public abstract ILogger? Exists(string name);
@@ -474,7 +474,7 @@ private static int GetWaitTime(DateTime startTimeUtc, int millisecondsTimeout)
/// </summary>
/// <param name="millisecondsTimeout">The maximum time in milliseconds to wait for logging events from asynchronous appenders to be flushed,
/// or <see cref="Timeout.Infinite"/> to wait indefinitely.</param>
- /// <returns><c>True</c> if all logging events were flushed successfully, else <c>false</c>.</returns>
+ /// <returns><see langword="true"/> if all logging events were flushed successfully, else <see langword="false"/>.</returns>
public bool Flush(int millisecondsTimeout)
{
if (millisecondsTimeout < -1)
diff --git a/src/log4net/ThreadContext.cs b/src/log4net/ThreadContext.cs
index d7d25a6b..f5821910 100644
--- a/src/log4net/ThreadContext.cs
+++ b/src/log4net/ThreadContext.cs
@@ -26,9 +26,9 @@ namespace log4net;
/// </summary>
/// <remarks>
/// <para>
-/// The <c>ThreadContext</c> provides a location for thread specific debugging
+/// The <see cref="ThreadContext"/> provides a location for thread specific debugging
/// information to be stored.
-/// The <c>ThreadContext</c> properties override any <see cref="GlobalContext"/>
+/// The <see cref="ThreadContext"/> properties override any <see cref="GlobalContext"/>
/// properties with the same name.
/// </para>
/// <para>
@@ -74,7 +74,7 @@ public static class ThreadContext
/// </value>
/// <remarks>
/// <para>
- /// The <c>ThreadContext</c> properties override any <see cref="GlobalContext"/>
+ /// The <see cref="ThreadContext"/> properties override any <see cref="GlobalContext"/>
/// properties with the same name.
/// </para>
/// </remarks>
diff --git a/src/log4net/Util/AppenderAttachedImpl.cs b/src/log4net/Util/AppenderAttachedImpl.cs
index e1ed3502..e8c71953 100644
--- a/src/log4net/Util/AppenderAttachedImpl.cs
+++ b/src/log4net/Util/AppenderAttachedImpl.cs
@@ -185,7 +185,7 @@ public void AddAppender(IAppender appender)
/// Gets all attached appenders.
/// </summary>
/// <returns>
- /// A collection of attached appenders, or <c>null</c> if there
+ /// A collection of attached appenders, or <see langword="null"/> if there
/// are no attached appenders.
/// </returns>
/// <remarks>
@@ -211,7 +211,7 @@ public AppenderCollection Appenders
/// </summary>
/// <param name="name">The name of the appender to get.</param>
/// <returns>
- /// The appender with the name specified, or <c>null</c> if no appender with the
+ /// The appender with the name specified, or <see langword="null"/> if no appender with the
/// specified name is found.
/// </returns>
/// <remarks>
diff --git a/src/log4net/Util/CompositeProperties.cs b/src/log4net/Util/CompositeProperties.cs
index e50a2f45..9eb5dc9d 100644
--- a/src/log4net/Util/CompositeProperties.cs
+++ b/src/log4net/Util/CompositeProperties.cs
@@ -63,7 +63,7 @@ internal CompositeProperties()
/// </para>
/// <para>
/// If none of the collections contain the specified key then
- /// <c>null</c> is returned.
+ /// <see langword="null"/> is returned.
/// </para>
/// </remarks>
public object? this[string key]
diff --git a/src/log4net/Util/CyclicBuffer.cs b/src/log4net/Util/CyclicBuffer.cs
index 3ae5ae1f..c376d070 100644
--- a/src/log4net/Util/CyclicBuffer.cs
+++ b/src/log4net/Util/CyclicBuffer.cs
@@ -66,11 +66,11 @@ public CyclicBuffer(int maxSize)
/// Appends a <paramref name="loggingEvent"/> to the buffer.
/// </summary>
/// <param name="loggingEvent">The event to append to the buffer.</param>
- /// <returns>The event discarded from the buffer, if the buffer is full, otherwise <c>null</c>.</returns>
+ /// <returns>The event discarded from the buffer, if the buffer is full, otherwise <see langword="null"/>.</returns>
/// <remarks>
/// <para>
/// Append an event to the buffer. If the buffer still contains free space then
- /// <c>null</c> is returned. If the buffer is full then an event will be dropped
+ /// <see langword="null"/> is returned. If the buffer is full then an event will be dropped
/// to make space for the new event, the dropped event is returned.
/// </para>
/// </remarks>
@@ -258,7 +258,7 @@ public void Resize(int newSize)
/// <remarks>
/// <para>
/// If <paramref name="i"/> is outside the range 0 to the number of events
- /// currently in the buffer, then <c>null</c> is returned.
+ /// currently in the buffer, then <see langword="null"/> is returned.
/// </para>
/// </remarks>
public LoggingEvent? this[int i]
diff --git a/src/log4net/Util/EmptyCollection.cs b/src/log4net/Util/EmptyCollection.cs
index a5424c1e..9e7528c9 100644
--- a/src/log4net/Util/EmptyCollection.cs
+++ b/src/log4net/Util/EmptyCollection.cs
@@ -87,7 +87,7 @@ public void CopyTo(Array array, int index)
/// </value>
/// <remarks>
/// <para>
- /// For the <see cref="EmptyCollection"/> this property is always <c>true</c>.
+ /// For the <see cref="EmptyCollection"/> this property is always <see langword="true"/>.
/// </para>
/// </remarks>
public bool IsSynchronized => true;
diff --git a/src/log4net/Util/EmptyDictionary.cs b/src/log4net/Util/EmptyDictionary.cs
index c6432f91..e80f227c 100644
--- a/src/log4net/Util/EmptyDictionary.cs
+++ b/src/log4net/Util/EmptyDictionary.cs
@@ -165,10 +165,10 @@ public void CopyTo(System.Array array, int index)
/// with the specified key.
/// </summary>
/// <param name="key">The key to locate in the <see cref="EmptyDictionary" />.</param>
- /// <returns><c>false</c></returns>
+ /// <returns><see langword="false"/></returns>
/// <remarks>
/// <para>
- /// As the collection is empty the <see cref="Contains"/> method always returns <c>false</c>.
+ /// As the collection is empty the <see cref="Contains"/> method always returns <see langword="false"/>.
/// </para>
/// </remarks>
public bool Contains(object key) => false;
@@ -203,10 +203,10 @@ public void CopyTo(System.Array array, int index)
/// <summary>
/// Gets a value indicating whether the <see cref="EmptyDictionary" /> has a fixed size.
/// </summary>
- /// <value><c>true</c></value>
+ /// <value><see langword="true"/></value>
/// <remarks>
/// <para>
- /// As the collection is empty <see cref="IsFixedSize"/> always returns <c>true</c>.
+ /// As the collection is empty <see cref="IsFixedSize"/> always returns <see langword="true"/>.
/// </para>
/// </remarks>
public bool IsFixedSize => true;
@@ -214,10 +214,10 @@ public void CopyTo(System.Array array, int index)
/// <summary>
/// Gets a value indicating whether the <see cref="EmptyDictionary" /> is read-only.
/// </summary>
- /// <value><c>true</c></value>
+ /// <value><see langword="true"/></value>
/// <remarks>
/// <para>
- /// As the collection is empty <see cref="IsReadOnly"/> always returns <c>true</c>.
+ /// As the collection is empty <see cref="IsReadOnly"/> always returns <see langword="true"/>.
/// </para>
/// </remarks>
public bool IsReadOnly => true;
@@ -248,11 +248,11 @@ public void CopyTo(System.Array array, int index)
/// Gets or sets the element with the specified key.
/// </summary>
/// <param name="key">The key of the element to get or set.</param>
- /// <value><c>null</c></value>
+ /// <value><see langword="null"/></value>
/// <remarks>
/// <para>
/// As the collection is empty no values can be looked up or stored.
- /// If the index getter is called then <c>null</c> is returned.
+ /// If the index getter is called then <see langword="null"/> is returned.
/// A <see cref="InvalidOperationException"/> is thrown if the setter is called.
/// </para>
/// </remarks>
diff --git a/src/log4net/Util/GlobalContextProperties.cs b/src/log4net/Util/GlobalContextProperties.cs
index efdd59eb..87f9c365 100644
--- a/src/log4net/Util/GlobalContextProperties.cs
+++ b/src/log4net/Util/GlobalContextProperties.cs
@@ -40,7 +40,7 @@ public sealed class GlobalContextProperties : ContextPropertiesBase
/// </summary>
/// <remarks>
/// <para>
- /// This variable is declared <c>volatile</c> to prevent the compiler and JIT from
+ /// This variable is declared <see langword="volatile"/> to prevent the compiler and JIT from
/// reordering reads and writes of this thread performed on different threads.
/// </para>
/// </remarks>
@@ -83,7 +83,7 @@ internal GlobalContextProperties()
{
lock (_syncRoot)
{
- var mutableProps = new PropertiesDictionary(_readOnlyProperties)
+ PropertiesDictionary mutableProps = new(_readOnlyProperties)
{
[key] = value
};
@@ -108,7 +108,7 @@ public void Remove(string key)
{
if (_readOnlyProperties.Contains(key))
{
- var mutableProps = new PropertiesDictionary(_readOnlyProperties);
+ PropertiesDictionary mutableProps = new(_readOnlyProperties);
mutableProps.Remove(key);
_readOnlyProperties = new ReadOnlyPropertiesDictionary(mutableProps);
}
diff --git a/src/log4net/Util/LogLog.cs b/src/log4net/Util/LogLog.cs
index 121bb4b3..05dacb5c 100644
--- a/src/log4net/Util/LogLog.cs
+++ b/src/log4net/Util/LogLog.cs
@@ -121,12 +121,12 @@ public LogLog(Type source, string prefix, string message, Exception? exception)
/// <para>
/// The <c>log4net.Internal.Debug</c> application setting
/// controls internal debugging. This setting should be set
- /// to <c>true</c> to enable debugging.
+ /// to <see langword="true"/> to enable debugging.
/// </para>
/// <para>
/// The <c>log4net.Internal.Quiet</c> application setting
/// suppresses all internal logging including error messages.
- /// This setting should be set to <c>true</c> to enable message
+ /// This setting should be set to <see langword="true"/> to enable message
/// suppression.
/// </para>
/// </remarks>
@@ -153,12 +153,12 @@ static LogLog()
/// is enabled or disabled.
/// </summary>
/// <value>
- /// <c>true</c> if log4net internal logging is enabled, otherwise
- /// <c>false</c>.
+ /// <see langword="true"/> if log4net internal logging is enabled, otherwise
+ /// <see langword="false"/>.
/// </value>
/// <remarks>
/// <para>
- /// When set to <c>true</c>, internal debug level logging will be
+ /// When set to <see langword="true"/>, internal debug level logging will be
/// displayed.
/// </para>
/// <para>
@@ -167,7 +167,7 @@ static LogLog()
/// file.
/// </para>
/// <para>
- /// The default value is <c>false</c>, i.e. debugging is
+ /// The default value is <see langword="false"/>, i.e. debugging is
/// disabled.
/// </para>
/// </remarks>
@@ -191,12 +191,12 @@ static LogLog()
/// from internal logging, not even for errors.
/// </summary>
/// <value>
- /// <c>true</c> if log4net should generate no output at all from internal
- /// logging, otherwise <c>false</c>.
+ /// <see langword="true"/> if log4net should generate no output at all from internal
+ /// logging, otherwise <see langword="false"/>.
/// </value>
/// <remarks>
/// <para>
- /// When set to <c>true</c> will cause internal logging at all levels to be
+ /// When set to <see langword="true"/> will cause internal logging at all levels to be
/// suppressed. This means that no warning or error reports will be logged.
/// This option overrides the <see cref="InternalDebugging"/> setting and
/// disables all debug also.
@@ -205,7 +205,7 @@ static LogLog()
/// <c>log4net.Internal.Quiet</c> in the application configuration file.
/// </para>
/// <para>
- /// The default value is <c>false</c>, i.e. internal logging is not
+ /// The default value is <see langword="false"/>, i.e. internal logging is not
/// disabled.
/// </para>
/// </remarks>
@@ -259,7 +259,7 @@ public static void ExecuteWithoutEmittingInternalMessages(Action callback)
/// Test if LogLog.Debug is enabled for output.
/// </summary>
/// <value>
- /// <c>true</c> if Debug is enabled
+ /// <see langword="true"/> if Debug is enabled
/// </value>
/// <remarks>
/// <para>
@@ -327,7 +327,7 @@ public static void Debug(Type source, string message, Exception? exception)
/// Test if LogLog.Warn is enabled for output.
/// </summary>
/// <value>
- /// <c>true</c> if Warn is enabled
+ /// <see langword="true"/> if Warn is enabled
/// </value>
public static bool IsWarnEnabled => !QuietMode;
@@ -390,7 +390,7 @@ public static void Warn(Type source, string message, Exception? exception)
/// Test if LogLog.Error is enabled for output.
/// </summary>
/// <value>
- /// <c>true</c> if Error is enabled
+ /// <see langword="true"/> if Error is enabled
/// </value>
/// <remarks>
/// <para>
diff --git a/src/log4net/Util/LogicalThreadContextProperties.cs b/src/log4net/Util/LogicalThreadContextProperties.cs
index b7ea8f4b..4798fffe 100644
--- a/src/log4net/Util/LogicalThreadContextProperties.cs
+++ b/src/log4net/Util/LogicalThreadContextProperties.cs
@@ -82,7 +82,7 @@ internal LogicalThreadContextProperties()
PropertiesDictionary props = GetProperties(true)!;
// Reason for cloning the dictionary below: object instances set on the CallContext
// need to be immutable to correctly flow through async/await
- var immutableProps = new PropertiesDictionary(props)
+ PropertiesDictionary immutableProps = new(props)
{
[key] = value
};
diff --git a/src/log4net/Util/LogicalThreadContextStack.cs b/src/log4net/Util/LogicalThreadContextStack.cs
index 0e067db8..fb4b1bfc 100644
--- a/src/log4net/Util/LogicalThreadContextStack.cs
+++ b/src/log4net/Util/LogicalThreadContextStack.cs
@@ -131,11 +131,11 @@ internal LogicalThreadContextStack(string propertyKey, TwoArgAction<string, Logi
/// <para>
/// Pushes a new context onto this stack. An <see cref="IDisposable"/>
/// is returned that can be used to clean up this stack. This
- /// can be easily combined with the <c>using</c> keyword to scope the
+ /// can be easily combined with the <see langword="using"/> keyword to scope the
/// context.
/// </para>
/// </remarks>
- /// <example>Simple example of using the <c>Push</c> method with the <c>using</c> keyword.
+ /// <example>Simple example of using the <see cref="Push"/> method with the <see langword="using"/> keyword.
/// <code lang="C#">
/// using(log4net.LogicalThreadContext.Stacks["NDC"].Push("Stack_Message"))
/// {
diff --git a/src/log4net/Util/NativeError.cs b/src/log4net/Util/NativeError.cs
index 6bc6a214..53479efb 100644
--- a/src/log4net/Util/NativeError.cs
+++ b/src/log4net/Util/NativeError.cs
@@ -94,7 +94,7 @@ public static NativeError GetLastError()
/// native Win32 <c>FormatMessage</c> function.
/// </para>
/// </remarks>
- public static NativeError GetError(int number) => new NativeError(number, GetErrorMessage(number));
+ public static NativeError GetError(int number) => new(number, GetErrorMessage(number));
/// <summary>
/// Retrieves the message corresponding with a Win32 message identifier.
diff --git a/src/log4net/Util/NullDictionaryEnumerator.cs b/src/log4net/Util/NullDictionaryEnumerator.cs
index d227e0d1..689cf060 100644
--- a/src/log4net/Util/NullDictionaryEnumerator.cs
+++ b/src/log4net/Util/NullDictionaryEnumerator.cs
@@ -74,12 +74,12 @@ private NullDictionaryEnumerator()
/// <summary>
/// Test if the enumerator can advance, if so advance.
/// </summary>
- /// <returns><c>false</c> as the <see cref="NullDictionaryEnumerator" /> cannot advance.</returns>
+ /// <returns><see langword="false"/> as the <see cref="NullDictionaryEnumerator" /> cannot advance.</returns>
/// <remarks>
/// <para>
/// As the enumerator is over an empty collection its <see cref="Current"/>
/// value cannot be moved over a valid position, therefore <see cref="MoveNext"/>
- /// will always return <c>false</c>.
+ /// will always return <see langword="false"/>.
/// </para>
/// </remarks>
public bool MoveNext() => false;
diff --git a/src/log4net/Util/NullEnumerator.cs b/src/log4net/Util/NullEnumerator.cs
index 836828e3..c242f289 100644
--- a/src/log4net/Util/NullEnumerator.cs
+++ b/src/log4net/Util/NullEnumerator.cs
@@ -74,12 +74,12 @@ private NullEnumerator()
/// <summary>
/// Test if the enumerator can advance, if so advance
/// </summary>
- /// <returns><c>false</c> as the <see cref="NullEnumerator" /> cannot advance.</returns>
+ /// <returns><see langword="false"/> as the <see cref="NullEnumerator" /> cannot advance.</returns>
/// <remarks>
/// <para>
/// As the enumerator is over an empty collection its <see cref="Current"/>
/// value cannot be moved over a valid position, therefore <see cref="MoveNext"/>
- /// will always return <c>false</c>.
+ /// will always return <see langword="false"/>.
/// </para>
/// </remarks>
public bool MoveNext() => false;
diff --git a/src/log4net/Util/NullSecurityContext.cs b/src/log4net/Util/NullSecurityContext.cs
index 5a1c239b..3332db90 100644
--- a/src/log4net/Util/NullSecurityContext.cs
+++ b/src/log4net/Util/NullSecurityContext.cs
@@ -62,10 +62,10 @@ private NullSecurityContext()
/// Impersonate this SecurityContext
/// </summary>
/// <param name="state">State supplied by the caller</param>
- /// <returns><c>null</c></returns>
+ /// <returns><see langword="null"/></returns>
/// <remarks>
/// <para>
- /// No impersonation is done and <c>null</c> is always returned.
+ /// No impersonation is done and <see langword="null"/> is always returned.
/// </para>
/// </remarks>
public override IDisposable? Impersonate(object state) => null;
diff --git a/src/log4net/Util/OptionConverter.cs b/src/log4net/Util/OptionConverter.cs
index 3e9539cd..141362ef 100644
--- a/src/log4net/Util/OptionConverter.cs
+++ b/src/log4net/Util/OptionConverter.cs
@@ -47,8 +47,8 @@ public static class OptionConverter
/// <returns>The <see cref="bool" /> value of <paramref name="argValue" />.</returns>
/// <remarks>
/// <para>
- /// If <paramref name="argValue"/> is "true", then <c>true</c> is returned.
- /// If <paramref name="argValue"/> is "false", then <c>false</c> is returned.
+ /// If <paramref name="argValue"/> is "true", then <see langword="true"/> is returned.
+ /// If <paramref name="argValue"/> is "false", then <see langword="false"/> is returned.
/// Otherwise, <paramref name="defaultValue"/> is returned.
/// </para>
/// </remarks>
@@ -131,7 +131,7 @@ public static long ToFileSize(string? argValue, long defaultValue)
/// <param name="target">The target type to convert to.</param>
/// <param name="txt">The string to convert to an object.</param>
/// <returns>
- /// The object converted from a string or <c>null</c> when the
+ /// The object converted from a string or <see langword="null"/> when the
/// conversion failed.
/// </returns>
/// <remarks>
@@ -179,7 +179,7 @@ public static long ToFileSize(string? argValue, long defaultValue)
/// </summary>
/// <param name="sourceType">The type to convert from.</param>
/// <param name="targetType">The type to convert to.</param>
- /// <returns><c>true</c> if there is a conversion from the source type to the target type.</returns>
+ /// <returns><see langword="true"/> if there is a conversion from the source type to the target type.</returns>
/// <remarks>
/// Checks if there is an appropriate type conversion from the source type to the target type.
/// <para>
@@ -384,7 +384,7 @@ public static string SubstituteVariables(string value, System.Collections.IDicti
/// </summary>
/// <param name="enumType">The type to convert to.</param>
/// <param name="value">The enum string value.</param>
- /// <param name="ignoreCase">If <c>true</c>, ignore case; otherwise, regard case.</param>
+ /// <param name="ignoreCase">If <see langword="true"/>, ignore case; otherwise, regard case.</param>
/// <returns>An object of type <paramref name="enumType" /> whose value is represented by <paramref name="value" />.</returns>
private static object ParseEnum(Type enumType, string value, bool ignoreCase)
=> Enum.Parse(enumType, value, ignoreCase);
diff --git a/src/log4net/Util/PatternParser.cs b/src/log4net/Util/PatternParser.cs
index 78241303..1066cde1 100644
--- a/src/log4net/Util/PatternParser.cs
+++ b/src/log4net/Util/PatternParser.cs
@@ -32,7 +32,7 @@ namespace log4net.Util;
/// </summary>
/// <remarks>
/// <para>
-/// The <c>PatternParser</c> processes a pattern string and
+/// The <see cref="PatternParser"/> processes a pattern string and
/// returns a chain of <see cref="PatternConverter"/> objects.
/// </para>
/// </remarks>
@@ -157,7 +157,7 @@ private void ParseInternal(string pattern, string[] matches)
ProcessLiteral(pattern.Substring(offset, i - offset));
offset = i + 1;
- var formattingInfo = new FormattingInfo();
+ FormattingInfo formattingInfo = new();
// Process formatting options
diff --git a/src/log4net/Util/PatternString.cs b/src/log4net/Util/PatternString.cs
index 1dca01b9..9de37f22 100644
--- a/src/log4net/Util/PatternString.cs
+++ b/src/log4net/Util/PatternString.cs
@@ -37,7 +37,7 @@ namespace log4net.Util;
/// <para>
/// This class functions similarly to the <see cref="log4net.Layout.PatternLayout"/>
/// in that it accepts a pattern and renders it to a string. Unlike the
-/// <see cref="log4net.Layout.PatternLayout"/> however the <c>PatternString</c>
+/// <see cref="log4net.Layout.PatternLayout"/> however the <see cref="PatternString"/>
/// does not render the properties of a specific <see cref="LoggingEvent"/> but
/// of the process in general.
/// </para>
diff --git a/src/log4net/Util/PatternStringConverters/AppSettingPatternConverter.cs b/src/log4net/Util/PatternStringConverters/AppSettingPatternConverter.cs
index df5801b0..cf4e28ab 100644
--- a/src/log4net/Util/PatternStringConverters/AppSettingPatternConverter.cs
+++ b/src/log4net/Util/PatternStringConverters/AppSettingPatternConverter.cs
@@ -85,7 +85,7 @@ private static IDictionary AppSettingsDictionary
/// property.
/// </para>
/// <para>
- /// If the <see cref="log4net.Util.PatternConverter.Option"/> is set to <c>null</c>
+ /// If the <see cref="log4net.Util.PatternConverter.Option"/> is set to <see langword="null"/>
/// then all the properties are written as key value pairs.
/// </para>
/// </remarks>
diff --git a/src/log4net/Util/PatternStringConverters/PropertyPatternConverter.cs b/src/log4net/Util/PatternStringConverters/PropertyPatternConverter.cs
index e29b665e..3d0c72c9 100644
--- a/src/log4net/Util/PatternStringConverters/PropertyPatternConverter.cs
+++ b/src/log4net/Util/PatternStringConverters/PropertyPatternConverter.cs
@@ -55,7 +55,7 @@ internal sealed class PropertyPatternConverter : PatternConverter
/// property.
/// </para>
/// <para>
- /// If the <see cref="log4net.Util.PatternConverter.Option"/> is set to <c>null</c>
+ /// If the <see cref="log4net.Util.PatternConverter.Option"/> is set to <see langword="null"/>
/// then all the properties are written as key value pairs.
/// </para>
/// </remarks>
diff --git a/src/log4net/Util/PropertiesDictionary.cs b/src/log4net/Util/PropertiesDictionary.cs
index d5e55937..476eaf5e 100644
--- a/src/log4net/Util/PropertiesDictionary.cs
+++ b/src/log4net/Util/PropertiesDictionary.cs
@@ -170,12 +170,12 @@ void IDictionary.Remove(object key)
/// See <see cref="IDictionary.IsReadOnly"/>
/// </summary>
/// <value>
- /// <c>false</c>
+ /// <see langword="false"/>
/// </value>
/// <remarks>
/// <para>
/// This collection is modifiable. This property always
- /// returns <c>false</c>.
+ /// returns <see langword="false"/>.
/// </para>
/// </remarks>
bool IDictionary.IsReadOnly => false;
diff --git a/src/log4net/Util/QuietTextWriter.cs b/src/log4net/Util/QuietTextWriter.cs
index 283916a0..43ca5c39 100644
--- a/src/log4net/Util/QuietTextWriter.cs
+++ b/src/log4net/Util/QuietTextWriter.cs
@@ -72,7 +72,7 @@ public IErrorHandler ErrorHandler
/// Gets a value indicating whether this writer is closed.
/// </summary>
/// <value>
- /// <c>true</c> if this writer is closed, otherwise <c>false</c>.
+ /// <see langword="true"/> if this writer is closed, otherwise <see langword="false"/>.
/// </value>
/// <remarks>
/// <para>
diff --git a/src/log4net/Util/ReaderWriterLock.cs b/src/log4net/Util/ReaderWriterLock.cs
index 75d5ba44..7fd52b4f 100644
--- a/src/log4net/Util/ReaderWriterLock.cs
+++ b/src/log4net/Util/ReaderWriterLock.cs
@@ -26,11 +26,11 @@ namespace log4net.Util;
/// </summary>
/// <remarks>
/// <para>
-/// <c>ReaderWriterLock</c> is used to synchronize access to a resource.
+/// <see cref="ReaderWriterLock"/> is used to synchronize access to a resource.
/// At any given time, it allows either concurrent read access for
/// multiple threads, or write access for a single thread. In a
/// situation where a resource is changed infrequently, a
-/// <c>ReaderWriterLock</c> provides better throughput than a simple
+/// <see cref="ReaderWriterLock"/> provides better throughput than a simple
/// one-at-a-time lock, such as <see cref="System.Threading.Monitor"/>.
/// </para>
/// <para>
diff --git a/src/log4net/Util/SystemInfo.cs b/src/log4net/Util/SystemInfo.cs
index 30b23fdc..74f0f6be 100644
--- a/src/log4net/Util/SystemInfo.cs
+++ b/src/log4net/Util/SystemInfo.cs
@@ -300,11 +300,11 @@ public static string ApplicationFriendlyName
public static DateTime ProcessStartTimeUtc { get; } = DateTime.UtcNow;
/// <summary>
- /// Text to output when a <c>null</c> is encountered.
+ /// Text to output when a <see langword="null"/> is encountered.
/// </summary>
/// <remarks>
/// <para>
- /// Use this value to indicate a <c>null</c> has been encountered while
+ /// Use this value to indicate a <see langword="null"/> has been encountered while
/// outputting a string representation of an item.
/// </para>
/// <para>
@@ -432,9 +432,9 @@ public static string AssemblyFileName(Assembly myAssembly)
/// </summary>
/// <param name="relativeType">A sibling type to use to load the type.</param>
/// <param name="typeName">The name of the type to load.</param>
- /// <param name="throwOnError">Flag set to <c>true</c> to throw an exception if the type cannot be loaded.</param>
- /// <param name="ignoreCase"><c>true</c> to ignore the case of the type name; otherwise, <c>false</c></param>
- /// <returns>The type loaded or <c>null</c> if it could not be loaded.</returns>
+ /// <param name="throwOnError">Flag set to <see langword="true"/> to throw an exception if the type cannot be loaded.</param>
+ /// <param name="ignoreCase"><see langword="true"/> to ignore the case of the type name; otherwise, <see langword="false"/></param>
+ /// <returns>The type loaded or <see langword="null"/> if it could not be loaded.</returns>
/// <remarks>
/// <para>
/// If the type name is fully qualified, i.e. if contains an assembly name in
@@ -454,9 +454,9 @@ public static string AssemblyFileName(Assembly myAssembly)
/// Loads the type specified in the type string.
/// </summary>
/// <param name="typeName">The name of the type to load.</param>
- /// <param name="throwOnError">Flag set to <c>true</c> to throw an exception if the type cannot be loaded.</param>
- /// <param name="ignoreCase"><c>true</c> to ignore the case of the type name; otherwise, <c>false</c></param>
- /// <returns>The type loaded or <c>null</c> if it could not be loaded.</returns>
+ /// <param name="throwOnError">Flag set to <see langword="true"/> to throw an exception if the type cannot be loaded.</param>
+ /// <param name="ignoreCase"><see langword="true"/> to ignore the case of the type name; otherwise, <see langword="false"/></param>
+ /// <returns>The type loaded or <see langword="null"/> if it could not be loaded.</returns>
/// <remarks>
/// <para>
/// If the type name is fully qualified, i.e. if contains an assembly name in
@@ -477,9 +477,9 @@ public static string AssemblyFileName(Assembly myAssembly)
/// </summary>
/// <param name="relativeAssembly">An assembly to load the type from.</param>
/// <param name="typeName">The name of the type to load.</param>
- /// <param name="throwOnError">Flag set to <c>true</c> to throw an exception if the type cannot be loaded.</param>
- /// <param name="ignoreCase"><c>true</c> to ignore the case of the type name; otherwise, <c>false</c></param>
- /// <returns>The type loaded or <c>null</c> if it could not be loaded.</returns>
+ /// <param name="throwOnError">Flag set to <see langword="true"/> to throw an exception if the type cannot be loaded.</param>
+ /// <param name="ignoreCase"><see langword="true"/> to ignore the case of the type name; otherwise, <see langword="false"/></param>
+ /// <returns>The type loaded or <see langword="null"/> if it could not be loaded.</returns>
/// <remarks>
/// <para>
/// If the type name is fully qualified, i.e. if contains an assembly name in
@@ -577,11 +577,11 @@ public static NotSupportedException CreateReadOnlyCollectionNotModifiableExcepti
/// </summary>
/// <param name="s">the string to parse</param>
/// <param name="val">out param where the parsed value is placed</param>
- /// <returns><c>true</c> if the string was parsed into an integer</returns>
+ /// <returns><see langword="true"/> if the string was parsed into an integer</returns>
/// <remarks>
/// <para>
/// Attempts to parse the string into an integer. If the string cannot
- /// be parsed then this method returns <c>false</c>. The method does not throw an exception.
+ /// be parsed then this method returns <see langword="false"/>. The method does not throw an exception.
/// </para>
/// </remarks>
public static bool TryParse(string s, out int val)
@@ -609,11 +609,11 @@ public static bool TryParse(string s, out int val)
/// </summary>
/// <param name="s">the string to parse</param>
/// <param name="val">out param where the parsed value is placed</param>
- /// <returns><c>true</c> if the string was parsed into an integer</returns>
+ /// <returns><see langword="true"/> if the string was parsed into an integer</returns>
/// <remarks>
/// <para>
/// Attempts to parse the string into an integer. If the string cannot
- /// be parsed then this method returns <c>false</c>. The method does not throw an exception.
+ /// be parsed then this method returns <see langword="false"/>. The method does not throw an exception.
/// </para>
/// </remarks>
public static bool TryParse(string s, out long val)
@@ -641,11 +641,11 @@ public static bool TryParse(string s, out long val)
/// </summary>
/// <param name="s">the string to parse</param>
/// <param name="val">out param where the parsed value is placed</param>
- /// <returns><c>true</c> if the string was parsed into an integer</returns>
+ /// <returns><see langword="true"/> if the string was parsed into an integer</returns>
/// <remarks>
/// <para>
/// Attempts to parse the string into an integer. If the string cannot
- /// be parsed then this method returns <c>false</c>. The method does not throw an exception.
+ /// be parsed then this method returns <see langword="false"/>. The method does not throw an exception.
/// </para>
/// </remarks>
public static bool TryParse(string s, out short val)
@@ -672,7 +672,7 @@ public static bool TryParse(string s, out short val)
/// Lookup an application setting
/// </summary>
/// <param name="key">the application settings key to lookup</param>
- /// <returns>the value for the key, or <c>null</c></returns>
+ /// <returns>the value for the key, or <see langword="null"/></returns>
public static string? GetAppSetting(string key)
{
if (IsAndroid)
@@ -750,13 +750,13 @@ public static string ConvertToFullPath(string path)
/// </summary>
/// <remarks>
/// If the platform permits, culture information is ignored completely (ordinal comparison).
- /// The aim of this method is to provide a fast comparison that deals with <c>null</c> and ignores different casing.
+ /// The aim of this method is to provide a fast comparison that deals with <see langword="null"/> and ignores different casing.
/// It is not supposed to deal with various, culture-specific habits.
/// Use it to compare against pure ASCII constants, like keywords etc.
/// </remarks>
/// <param name="a">The one string.</param>
/// <param name="b">The other string.</param>
- /// <returns><c>true</c> if the strings are equal, <c>false</c> otherwise.</returns>
+ /// <returns><see langword="true"/> if the strings are equal, <see langword="false"/> otherwise.</returns>
public static bool EqualsIgnoringCase(string? a, string? b)
=> string.Equals(a, b, StringComparison.OrdinalIgnoreCase);
diff --git a/src/log4net/Util/SystemStringFormat.cs b/src/log4net/Util/SystemStringFormat.cs
index 4b9644f1..d5f91a9b 100644
--- a/src/log4net/Util/SystemStringFormat.cs
+++ b/src/log4net/Util/SystemStringFormat.cs
@@ -99,7 +99,7 @@ private static string StringFormatError(Exception formatException, string? forma
{
try
{
- var buf = new StringBuilder("<log4net.Error>", 100);
+ StringBuilder buf = new("<log4net.Error>", 100);
buf.Append("Exception during StringFormat: ").Append(formatException.Message);
buf.Append(" <format>").Append(format).Append("</format>");
buf.Append("<args>");
diff --git a/src/log4net/Util/ThreadContextStack.cs b/src/log4net/Util/ThreadContextStack.cs
index 23a31feb..774cfc96 100644
--- a/src/log4net/Util/ThreadContextStack.cs
+++ b/src/log4net/Util/ThreadContextStack.cs
@@ -117,11 +117,11 @@ internal ThreadContextStack()
/// <para>
/// Pushes a new context onto this stack. An <see cref="IDisposable"/>
/// is returned that can be used to clean up this stack. This
- /// can be easily combined with the <c>using</c> keyword to scope the
+ /// can be easily combined with the <see langword="using"/> keyword to scope the
/// context.
/// </para>
/// </remarks>
- /// <example>Simple example of using the <c>Push</c> method with the <c>using</c> keyword.
+ /// <example>Simple example of using the <see cref="Push"/> method with the <see langword="using"/> keyword.
/// <code lang="C#">
/// using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message"))
/// {
diff --git a/src/log4net/Util/TypeConverters/BooleanConverter.cs b/src/log4net/Util/TypeConverters/BooleanConverter.cs
index d90556a6..53d853a1 100644
--- a/src/log4net/Util/TypeConverters/BooleanConverter.cs
+++ b/src/log4net/Util/TypeConverters/BooleanConverter.cs
@@ -27,7 +27,7 @@ namespace log4net.Util.TypeConverters;
/// </summary>
/// <remarks>
/// <para>
-/// Supports conversion from string to <c>bool</c> type.
+/// Supports conversion from string to <see langword="bool"/> type.
/// </para>
/// </remarks>
/// <seealso cref="ConverterRegistry"/>
@@ -43,7 +43,7 @@ internal sealed class BooleanConverter : IConvertFrom
/// </summary>
/// <param name="sourceType">the type to convert</param>
/// <returns>
- /// <c>True</c> if the <paramref name="sourceType"/> is
+ /// <see langword="true"/> if the <paramref name="sourceType"/> is
/// the <see cref="string"/> type.
/// </returns>
public bool CanConvertFrom(Type sourceType) => sourceType == typeof(string);
diff --git a/src/log4net/Util/TypeConverters/ConverterRegistry.cs b/src/log4net/Util/TypeConverters/ConverterRegistry.cs
index 82eb0140..03259584 100644
--- a/src/log4net/Util/TypeConverters/ConverterRegistry.cs
+++ b/src/log4net/Util/TypeConverters/ConverterRegistry.cs
@@ -91,7 +91,7 @@ public static void AddConverter(Type destinationType, Type converterType)
/// <param name="sourceType">The type being converted from.</param>
/// <param name="destinationType">The type being converted to.</param>
/// <returns>
- /// The type converter instance to use for type conversions or <c>null</c>
+ /// The type converter instance to use for type conversions or <see langword="null"/>
/// if no type converter is found.
/// </returns>
public static IConvertTo? GetConvertTo(Type sourceType, Type destinationType)
@@ -121,7 +121,7 @@ public static void AddConverter(Type destinationType, Type converterType)
/// </summary>
/// <param name="destinationType">The type being converted to.</param>
/// <returns>
- /// The type converter instance to use for type conversions or <c>null</c>
+ /// The type converter instance to use for type conversions or <see langword="null"/>
/// if no type converter is found.
/// </returns>
public static IConvertFrom? GetConvertFrom(Type destinationType)
@@ -150,7 +150,7 @@ public static void AddConverter(Type destinationType, Type converterType)
/// </summary>
/// <param name="destinationType">The type being converted to.</param>
/// <returns>
- /// The type converter instance to use for type conversions or <c>null</c>
+ /// The type converter instance to use for type conversions or <see langword="null"/>
/// if no type converter is found.
/// </returns>
private static object? GetConverterFromAttribute(Type destinationType)
@@ -177,7 +177,7 @@ public static void AddConverter(Type destinationType, Type converterType)
/// </summary>
/// <param name="converterType">The type of the type converter.</param>
/// <returns>
- /// The type converter instance to use for type conversions or <c>null</c>
+ /// The type converter instance to use for type conversions or <see langword="null"/>
/// if no type converter is found.
/// </returns>
/// <remarks>
diff --git a/src/log4net/Util/TypeConverters/EncodingConverter.cs b/src/log4net/Util/TypeConverters/EncodingConverter.cs
index 9042a64b..8ddcf5b3 100644
--- a/src/log4net/Util/TypeConverters/EncodingConverter.cs
+++ b/src/log4net/Util/TypeConverters/EncodingConverter.cs
@@ -39,7 +39,7 @@ internal sealed class EncodingConverter : IConvertFrom
/// </summary>
/// <param name="sourceType">the type to convert</param>
/// <returns>
- /// <c>True</c> if the <paramref name="sourceType"/> is
+ /// <see langword="true"/> if the <paramref name="sourceType"/> is
/// the <see cref="string"/> type.
/// </returns>
public bool CanConvertFrom(Type sourceType) => sourceType == typeof(string);
diff --git a/src/log4net/Util/TypeConverters/IPAddressConverter.cs b/src/log4net/Util/TypeConverters/IPAddressConverter.cs
index 7054b1c2..bbfab91d 100644
--- a/src/log4net/Util/TypeConverters/IPAddressConverter.cs
+++ b/src/log4net/Util/TypeConverters/IPAddressConverter.cs
@@ -45,7 +45,7 @@ internal sealed class IpAddressConverter : IConvertFrom
/// <returns>true if the conversion is possible</returns>
/// <remarks>
/// <para>
- /// Returns <c>true</c> if the <paramref name="sourceType"/> is
+ /// Returns <see langword="true"/> if the <paramref name="sourceType"/> is
/// the <see cref="string"/> type.
/// </para>
/// </remarks>
diff --git a/src/log4net/Util/TypeConverters/PatternLayoutConverter.cs b/src/log4net/Util/TypeConverters/PatternLayoutConverter.cs
index 26c8c263..557b57eb 100644
--- a/src/log4net/Util/TypeConverters/PatternLayoutConverter.cs
+++ b/src/log4net/Util/TypeConverters/PatternLayoutConverter.cs
@@ -43,7 +43,7 @@ internal sealed class PatternLayoutConverter : IConvertFrom
/// </summary>
/// <param name="sourceType">the type to convert</param>
/// <returns>
- /// <c>True</c> if the <paramref name="sourceType"/> is
+ /// <see langword="true"/> if the <paramref name="sourceType"/> is
/// the <see cref="string"/> type.
/// </returns>
public bool CanConvertFrom(System.Type sourceType) => sourceType == typeof(string);
diff --git a/src/log4net/Util/TypeConverters/PatternStringConverter.cs b/src/log4net/Util/TypeConverters/PatternStringConverter.cs
index d3ccba1b..7af6687c 100644
--- a/src/log4net/Util/TypeConverters/PatternStringConverter.cs
+++ b/src/log4net/Util/TypeConverters/PatternStringConverter.cs
@@ -49,7 +49,7 @@ internal sealed class PatternStringConverter : IConvertTo, IConvertFrom
/// <returns>true if the conversion is possible</returns>
/// <remarks>
/// <para>
- /// Returns <c>true</c> if the <paramref name="targetType"/> is
+ /// Returns <see langword="true"/> if the <paramref name="targetType"/> is
/// assignable from a <see cref="string"/> type.
/// </para>
/// </remarks>
@@ -86,7 +86,7 @@ public object ConvertTo(object source, Type targetType)
/// </summary>
/// <param name="sourceType">the type to convert</param>
/// <returns>
- /// <c>True</c> if the <paramref name="sourceType"/> is
+ /// <see langword="true"/> if the <paramref name="sourceType"/> is
/// the <see cref="string"/> type.
/// </returns>
public bool CanConvertFrom(System.Type sourceType) => sourceType == typeof(string);
diff --git a/src/log4net/Util/TypeConverters/TypeConverter.cs b/src/log4net/Util/TypeConverters/TypeConverter.cs
index 968df5fc..356bb77e 100644
--- a/src/log4net/Util/TypeConverters/TypeConverter.cs
+++ b/src/log4net/Util/TypeConverters/TypeConverter.cs
@@ -37,7 +37,7 @@ internal sealed class TypeConverter : IConvertFrom
/// </summary>
/// <param name="sourceType">the type to convert</param>
/// <returns>
- /// <c>True</c> if the <paramref name="sourceType"/> is
+ /// <see langword="true"/> if the <paramref name="sourceType"/> is
/// the <see cref="string"/> type.
/// </returns>
public bool CanConvertFrom(Type sourceType) => sourceType == typeof(string);
diff --git a/src/log4net/Util/TypeConverters/TypeConverterAttribute.cs b/src/log4net/Util/TypeConverters/TypeConverterAttribute.cs
index 42860a0f..a71a363f 100644
--- a/src/log4net/Util/TypeConverters/TypeConverterAttribute.cs
+++ b/src/log4net/Util/TypeConverters/TypeConverterAttribute.cs
@@ -31,7 +31,7 @@ namespace log4net.Util.TypeConverters;
/// </para>
/// <para>
/// To associate a type converter with a target type apply a
-/// <c>TypeConverterAttribute</c> to the target type. Specify the
+/// <see cref="TypeConverterAttribute"/> to the target type. Specify the
/// type of the type converter on the attribute.
/// </para>
/// </remarks>