Skip to content

Commit

Permalink
🎨 sort modifiers with default .net style sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffynuts committed Sep 30, 2020
1 parent d5cb207 commit 525526b
Show file tree
Hide file tree
Showing 135 changed files with 435 additions and 435 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static void rep_ConfigurationChanged(object sender, EventArgs e)

public class LogLogAppender : AppenderSkeleton
{
private readonly static Type declaringType = typeof(LogLogAppender);
private static readonly Type declaringType = typeof(LogLogAppender);

public override void ActivateOptions()
{
Expand Down
22 changes: 11 additions & 11 deletions src/log4net/Appender/AdoNetAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ protected IDbConnection Connection
/// <see cref="ActivateOptions"/> must be called again.
/// </para>
/// </remarks>
override public void ActivateOptions()
public override void ActivateOptions()
{
base.ActivateOptions();

Expand All @@ -431,7 +431,7 @@ override public void ActivateOptions()
/// Closes the database command and database connection.
/// </para>
/// </remarks>
override protected void OnClose()
protected override void OnClose()
{
base.OnClose();
DiposeConnection();
Expand All @@ -451,7 +451,7 @@ override protected void OnClose()
/// array into the database.
/// </para>
/// </remarks>
override protected void SendBuffer(LoggingEvent[] events)
protected override void SendBuffer(LoggingEvent[] events)
{
if (ReconnectOnError && (Connection == null || Connection.State != ConnectionState.Open))
{
Expand Down Expand Up @@ -536,7 +536,7 @@ public void AddParameter(AdoNetAppenderParameter parameter)
/// property for more information.
/// </para>
/// </remarks>
virtual protected void SendBuffer(IDbTransaction dbTran, LoggingEvent[] events)
protected virtual void SendBuffer(IDbTransaction dbTran, LoggingEvent[] events)
{
// string.IsNotNullOrWhiteSpace() does not exist in ancient .NET frameworks
if (CommandText != null && CommandText.Trim() != "")
Expand Down Expand Up @@ -608,7 +608,7 @@ virtual protected void SendBuffer(IDbTransaction dbTran, LoggingEvent[] events)
/// <returns>
/// Text that can be passed to a <see cref="System.Data.IDbCommand"/>.
/// </returns>
virtual protected string GetLogStatement(LoggingEvent logEvent)
protected virtual string GetLogStatement(LoggingEvent logEvent)
{
if (Layout == null)
{
Expand All @@ -632,7 +632,7 @@ virtual protected string GetLogStatement(LoggingEvent logEvent)
/// <param name="connectionType">The <see cref="Type"/> of the <see cref="IDbConnection"/> object.</param>
/// <param name="connectionString">The connectionString output from the ResolveConnectionString method.</param>
/// <returns>An <see cref="IDbConnection"/> instance with a valid connection string.</returns>
virtual protected IDbConnection CreateConnection(Type connectionType, string connectionString)
protected virtual IDbConnection CreateConnection(Type connectionType, string connectionString)
{
IDbConnection connection = (IDbConnection)Activator.CreateInstance(connectionType);
connection.ConnectionString = connectionString;
Expand All @@ -648,7 +648,7 @@ virtual protected IDbConnection CreateConnection(Type connectionType, string con
/// </remarks>
/// <param name="connectionStringContext">Additional information describing the connection string.</param>
/// <returns>A connection string used to connect to the database.</returns>
virtual protected string ResolveConnectionString(out string connectionStringContext)
protected virtual string ResolveConnectionString(out string connectionStringContext)
{
if (ConnectionString != null && ConnectionString.Length > 0)
{
Expand Down Expand Up @@ -702,7 +702,7 @@ virtual protected string ResolveConnectionString(out string connectionStringCont
/// </para>
/// </remarks>
/// <returns>The <see cref="Type"/> of the ADO.NET provider</returns>
virtual protected Type ResolveConnectionType()
protected virtual Type ResolveConnectionType()
{
try
{
Expand Down Expand Up @@ -858,7 +858,7 @@ private void DiposeConnection()
/// Used by the internal logger to record the Type of the
/// log message.
/// </remarks>
private readonly static Type declaringType = typeof(AdoNetAppender);
private static readonly Type declaringType = typeof(AdoNetAppender);

#endregion Private Static Fields
}
Expand Down Expand Up @@ -1053,7 +1053,7 @@ public IRawLayout Layout
/// this parameter to its collection of parameters.
/// </para>
/// </remarks>
virtual public void Prepare(IDbCommand command)
public virtual void Prepare(IDbCommand command)
{
// Create a new parameter
IDbDataParameter param = command.CreateParameter();
Expand Down Expand Up @@ -1093,7 +1093,7 @@ virtual public void Prepare(IDbCommand command)
/// object. Sets the value of the parameter on the command object.
/// </para>
/// </remarks>
virtual public void FormatValue(IDbCommand command, LoggingEvent loggingEvent)
public virtual void FormatValue(IDbCommand command, LoggingEvent loggingEvent)
{
// Lookup the parameter
IDbDataParameter param = (IDbDataParameter)command.Parameters[ParameterName];
Expand Down
6 changes: 3 additions & 3 deletions src/log4net/Appender/AnsiColorTerminalAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public AnsiColorTerminalAppender()
/// This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
/// </para>
/// </remarks>
virtual public string Target
public virtual string Target
{
get { return m_writeToErrorStream ? ConsoleError : ConsoleOut; }
set
Expand Down Expand Up @@ -296,7 +296,7 @@ public void AddMapping(LevelColors mapping)
/// The format of the output will depend on the appender's layout.
/// </para>
/// </remarks>
override protected void Append(log4net.Core.LoggingEvent loggingEvent)
protected override void Append(log4net.Core.LoggingEvent loggingEvent)
{
string loggingMessage = RenderLoggingEvent(loggingEvent);

Expand Down Expand Up @@ -366,7 +366,7 @@ override protected void Append(log4net.Core.LoggingEvent loggingEvent)
/// This appender requires a <see cref="Layout"/> to be set.
/// </para>
/// </remarks>
override protected bool RequiresLayout
protected override bool RequiresLayout
{
get { return true; }
}
Expand Down
4 changes: 2 additions & 2 deletions src/log4net/Appender/AppenderCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public AppenderCollection(ICollection col)
/// Used to access protected constructor
/// </summary>
/// <exclude/>
internal protected enum Tag
protected internal enum Tag
{
/// <summary>
/// A value
Expand All @@ -173,7 +173,7 @@ internal protected enum Tag
/// </summary>
/// <param name="tag"></param>
/// <exclude/>
internal protected AppenderCollection(Tag tag)
protected internal AppenderCollection(Tag tag)
{
m_array = null;
}
Expand Down
28 changes: 14 additions & 14 deletions src/log4net/Appender/AppenderSkeleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public Level Threshold
/// implementation for the <see cref="ErrorHandler"/> property.
/// </para>
/// </remarks>
virtual public IErrorHandler ErrorHandler
public virtual IErrorHandler ErrorHandler
{
get { return this.m_errorHandler; }
set
Expand Down Expand Up @@ -152,7 +152,7 @@ virtual public IErrorHandler ErrorHandler
/// and so all Filters on this Appender are available through the result.
/// </para>
/// </remarks>
virtual public IFilter FilterHead
public virtual IFilter FilterHead
{
get { return m_headFilter; }
}
Expand All @@ -167,7 +167,7 @@ virtual public IFilter FilterHead
/// </para>
/// </remarks>
/// <seealso cref="RequiresLayout"/>
virtual public ILayout Layout
public virtual ILayout Layout
{
get { return m_layout; }
set { m_layout = value; }
Expand All @@ -193,7 +193,7 @@ virtual public ILayout Layout
/// <see cref="ActivateOptions"/> must be called again.
/// </para>
/// </remarks>
virtual public void ActivateOptions()
public virtual void ActivateOptions()
{
}

Expand Down Expand Up @@ -479,7 +479,7 @@ public void DoAppend(LoggingEvent[] loggingEvents)
/// </list>
/// </para>
/// </remarks>
virtual protected bool FilterEvent(LoggingEvent loggingEvent)
protected virtual bool FilterEvent(LoggingEvent loggingEvent)
{
if (!IsAsSevereAsThreshold(loggingEvent.Level))
{
Expand Down Expand Up @@ -523,7 +523,7 @@ virtual protected bool FilterEvent(LoggingEvent loggingEvent)
/// back of the filter chain.
/// </para>
/// </remarks>
virtual public void AddFilter(IFilter filter)
public virtual void AddFilter(IFilter filter)
{
if (filter == null)
{
Expand All @@ -549,7 +549,7 @@ virtual public void AddFilter(IFilter filter)
/// Clears the filter list for this appender.
/// </para>
/// </remarks>
virtual public void ClearFilters()
public virtual void ClearFilters()
{
m_headFilter = m_tailFilter = null;
}
Expand All @@ -571,7 +571,7 @@ virtual public void ClearFilters()
/// <c>true</c> if the <paramref name="level"/> meets the <see cref="Threshold"/>
/// requirements of this appender.
/// </returns>
virtual protected bool IsAsSevereAsThreshold(Level level)
protected virtual bool IsAsSevereAsThreshold(Level level)
{
return ((m_threshold == null) || level >= m_threshold);
}
Expand All @@ -589,7 +589,7 @@ virtual protected bool IsAsSevereAsThreshold(Level level)
/// It is a programming error to append to a closed appender.
/// </para>
/// </remarks>
virtual protected void OnClose()
protected virtual void OnClose()
{
// Do nothing by default
}
Expand All @@ -612,7 +612,7 @@ virtual protected void OnClose()
/// override the <see cref="M:PreAppendCheck()"/> method.
/// </para>
/// </remarks>
abstract protected void Append(LoggingEvent loggingEvent);
protected abstract void Append(LoggingEvent loggingEvent);

/// <summary>
/// Append a bulk array of logging events.
Expand All @@ -628,7 +628,7 @@ virtual protected void OnClose()
/// override this method in addition to <see cref="M:Append(LoggingEvent)"/>.
/// </para>
/// </remarks>
virtual protected void Append(LoggingEvent[] loggingEvents)
protected virtual void Append(LoggingEvent[] loggingEvents)
{
foreach(LoggingEvent loggingEvent in loggingEvents)
{
Expand All @@ -654,7 +654,7 @@ virtual protected void Append(LoggingEvent[] loggingEvents)
/// </para>
/// </remarks>
/// <returns><c>true</c> if the call to <see cref="M:Append(LoggingEvent)"/> should proceed.</returns>
virtual protected bool PreAppendCheck()
protected virtual bool PreAppendCheck()
{
if ((m_layout == null) && RequiresLayout)
{
Expand Down Expand Up @@ -775,7 +775,7 @@ protected void RenderLoggingEvent(TextWriter writer, LoggingEvent loggingEvent)
/// <returns>
/// <c>true</c> if the appender requires a layout object, otherwise <c>false</c>.
/// </returns>
virtual protected bool RequiresLayout
protected virtual bool RequiresLayout
{
get { return false; }
}
Expand Down Expand Up @@ -902,7 +902,7 @@ public virtual bool Flush(int millisecondsTimeout)
/// Used by the internal logger to record the Type of the
/// log message.
/// </remarks>
private readonly static Type declaringType = typeof(AppenderSkeleton);
private static readonly Type declaringType = typeof(AppenderSkeleton);

#endregion Private Static Fields
}
Expand Down
4 changes: 2 additions & 2 deletions src/log4net/Appender/AspNetTraceAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public AspNetTraceAppender()
/// (<see cref="TraceContext"/>).
/// </para>
/// </remarks>
override protected void Append(LoggingEvent loggingEvent)
protected override void Append(LoggingEvent loggingEvent)
{
// check if log4net is running in the context of an ASP.NET application
if (HttpContext.Current != null)
Expand Down Expand Up @@ -114,7 +114,7 @@ override protected void Append(LoggingEvent loggingEvent)
/// This appender requires a <see cref="Layout"/> to be set.
/// </para>
/// </remarks>
override protected bool RequiresLayout
protected override bool RequiresLayout
{
get { return true; }
}
Expand Down
14 changes: 7 additions & 7 deletions src/log4net/Appender/BufferingAppenderSkeleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public ITriggeringEventEvaluator LossyEvaluator
/// </para>
/// </remarks>
[Obsolete("Use Fix property")]
virtual public bool OnlyFixPartialEventData
public virtual bool OnlyFixPartialEventData
{
get { return (Fix == FixFlags.Partial); }
set
Expand Down Expand Up @@ -252,7 +252,7 @@ virtual public bool OnlyFixPartialEventData
/// </para>
/// </remarks>
/// <seealso cref="LoggingEvent.Fix"/>
virtual public FixFlags Fix
public virtual FixFlags Fix
{
get { return m_fixFlags; }
set { m_fixFlags = value; }
Expand Down Expand Up @@ -381,7 +381,7 @@ public virtual void Flush(bool flushLossyBuffer)
/// <see cref="ActivateOptions"/> must be called again.
/// </para>
/// </remarks>
override public void ActivateOptions()
public override void ActivateOptions()
{
base.ActivateOptions();

Expand Down Expand Up @@ -417,7 +417,7 @@ override public void ActivateOptions()
/// the buffer must be sent when the appender is closed.
/// </para>
/// </remarks>
override protected void OnClose()
protected override void OnClose()
{
// Flush the buffer on close
Flush(true);
Expand Down Expand Up @@ -453,7 +453,7 @@ override protected void OnClose()
/// is processed.
/// </para>
/// </remarks>
override protected void Append(LoggingEvent loggingEvent)
protected override void Append(LoggingEvent loggingEvent)
{
// If the buffer size is set to 1 or less then the buffer will be
// sent immediately because there is not enough space in the buffer
Expand Down Expand Up @@ -542,7 +542,7 @@ override protected void Append(LoggingEvent loggingEvent)
/// The subclass must override <see cref="M:SendBuffer(LoggingEvent[])"/>.
/// </para>
/// </remarks>
virtual protected void SendFromBuffer(LoggingEvent firstLoggingEvent, CyclicBuffer buffer)
protected virtual void SendFromBuffer(LoggingEvent firstLoggingEvent, CyclicBuffer buffer)
{
LoggingEvent[] bufferEvents = buffer.PopAll();

Expand Down Expand Up @@ -576,7 +576,7 @@ virtual protected void SendFromBuffer(LoggingEvent firstLoggingEvent, CyclicBuff
/// The subclass must override this method to process the buffered events.
/// </para>
/// </remarks>
abstract protected void SendBuffer(LoggingEvent[] events);
protected abstract void SendBuffer(LoggingEvent[] events);

#region Private Static Fields

Expand Down
Loading

0 comments on commit 525526b

Please sign in to comment.