Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Sep 13, 2023
1 parent a58b7df commit 7a88fc8
Show file tree
Hide file tree
Showing 53 changed files with 56 additions and 143 deletions.
2 changes: 1 addition & 1 deletion Catel/Anotar.Catel.Fody/OnExceptionProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Instruction GetMethodBodyFirstInstruction()
{
if (Method.IsConstructor)
{
return body.Instructions.First(i => i.OpCode == OpCodes.Call).Next;
return body.Instructions.First(_ => _.OpCode == OpCodes.Call).Next;
}
return body.Instructions.First();
}
Expand Down
4 changes: 1 addition & 3 deletions Catel/Anotar.Catel/LogMinimalMessageAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Catel;
/// Used to suppress message prefixing.
/// </summary>
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)]
public class LogMinimalMessageAttribute : Attribute
{
}
public class LogMinimalMessageAttribute : Attribute;
4 changes: 1 addition & 3 deletions Catel/Anotar.Catel/LogToDebugOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Catel;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Debug</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToDebugOnExceptionAttribute : Attribute
{
}
public class LogToDebugOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions Catel/Anotar.Catel/LogToErrorOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Catel;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Error</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToErrorOnExceptionAttribute : Attribute
{
}
public class LogToErrorOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions Catel/Anotar.Catel/LogToInfoOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Catel;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Info</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToInfoOnExceptionAttribute : Attribute
{
}
public class LogToInfoOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions Catel/Anotar.Catel/LogToWarningOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Catel;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Warn</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToWarningOnExceptionAttribute : Attribute
{
}
public class LogToWarningOnExceptionAttribute : Attribute;
2 changes: 1 addition & 1 deletion Common/CecilExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static string DisplayName(this TypeReference typeReference)
{
if (typeReference is GenericInstanceType genericInstanceType && genericInstanceType.HasGenericArguments)
{
return typeReference.Name.Split('`').First() + "<" + string.Join(", ", genericInstanceType.GenericArguments.Select(c => c.DisplayName())) + ">";
return typeReference.Name.Split('`').First() + "<" + string.Join(", ", genericInstanceType.GenericArguments.Select(_ => _.DisplayName())) + ">";
}
return typeReference.Name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Instruction GetMethodBodyFirstInstruction()
{
if (Method.IsConstructor)
{
return body.Instructions.First(i => i.OpCode == OpCodes.Call).Next;
return body.Instructions.First(_ => _.OpCode == OpCodes.Call).Next;
}
return body.Instructions.First();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.CommonLogging;
/// Used to suppress message prefixing.
/// </summary>
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)]
public class LogMinimalMessageAttribute : Attribute
{
}
public class LogMinimalMessageAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.CommonLogging;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Debug</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToDebugOnExceptionAttribute : Attribute
{
}
public class LogToDebugOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.CommonLogging;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Error</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToErrorOnExceptionAttribute : Attribute
{
}
public class LogToErrorOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.CommonLogging;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Fatal</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToFatalOnExceptionAttribute : Attribute
{
}
public class LogToFatalOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.CommonLogging;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Info</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToInfoOnExceptionAttribute : Attribute
{
}
public class LogToInfoOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.CommonLogging;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Trace</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToTraceOnExceptionAttribute : Attribute
{
}
public class LogToTraceOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.CommonLogging;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Warn</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToWarnOnExceptionAttribute : Attribute
{
}
public class LogToWarnOnExceptionAttribute : Attribute;
2 changes: 1 addition & 1 deletion Custom/Anotar.Custom.Fody/OnExceptionProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Instruction GetMethodBodyFirstInstruction()
{
if (Method.IsConstructor)
{
return body.Instructions.First(i => i.OpCode == OpCodes.Call).Next;
return body.Instructions.First(_ => _.OpCode == OpCodes.Call).Next;
}
return body.Instructions.First();
}
Expand Down
4 changes: 1 addition & 3 deletions Custom/Anotar.Custom/LogMinimalMessageAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Custom;
/// Used to suppress message prefixing.
/// </summary>
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)]
public class LogMinimalMessageAttribute : Attribute
{
}
public class LogMinimalMessageAttribute : Attribute;
4 changes: 1 addition & 3 deletions Custom/Anotar.Custom/LogToDebugOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Custom;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Debug</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToDebugOnExceptionAttribute : Attribute
{
}
public class LogToDebugOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions Custom/Anotar.Custom/LogToErrorOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Custom;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Error</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToErrorOnExceptionAttribute : Attribute
{
}
public class LogToErrorOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions Custom/Anotar.Custom/LogToFatalOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Custom;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Fatal</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToFatalOnExceptionAttribute : Attribute
{
}
public class LogToFatalOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions Custom/Anotar.Custom/LogToInformationOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Custom;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Information</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToInformationOnExceptionAttribute : Attribute
{
}
public class LogToInformationOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions Custom/Anotar.Custom/LogToTraceOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Custom;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Trace</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToTraceOnExceptionAttribute : Attribute
{
}
public class LogToTraceOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions Custom/Anotar.Custom/LogToWarningOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.Custom;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Warning</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToWarningOnExceptionAttribute : Attribute
{
}
public class LogToWarningOnExceptionAttribute : Attribute;
2 changes: 1 addition & 1 deletion NLog/Anotar.NLog.Fody/OnExceptionProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Instruction GetMethodBodyFirstInstruction()
{
if (Method.IsConstructor)
{
return body.Instructions.First(i => i.OpCode == OpCodes.Call).Next;
return body.Instructions.First(_ => _.OpCode == OpCodes.Call).Next;
}
return body.Instructions.First();
}
Expand Down
4 changes: 1 addition & 3 deletions NLog/Anotar.NLog/LogMinimalMessageAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NLog;
/// Used to suppress message prefixing.
/// </summary>
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)]
public class LogMinimalMessageAttribute : Attribute
{
}
public class LogMinimalMessageAttribute : Attribute;
4 changes: 1 addition & 3 deletions NLog/Anotar.NLog/LogToDebugOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NLog;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Debug</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToDebugOnExceptionAttribute : Attribute
{
}
public class LogToDebugOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions NLog/Anotar.NLog/LogToErrorOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NLog;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Error</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToErrorOnExceptionAttribute : Attribute
{
}
public class LogToErrorOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions NLog/Anotar.NLog/LogToFatalOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NLog;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Fatal</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToFatalOnExceptionAttribute : Attribute
{
}
public class LogToFatalOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions NLog/Anotar.NLog/LogToInfoOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NLog;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Info</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToInfoOnExceptionAttribute : Attribute
{
}
public class LogToInfoOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions NLog/Anotar.NLog/LogToTraceOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NLog;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Trace</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToTraceOnExceptionAttribute : Attribute
{
}
public class LogToTraceOnExceptionAttribute : Attribute;
4 changes: 1 addition & 3 deletions NLog/Anotar.NLog/LogToWarnOnExceptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NLog;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Warn</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToWarnOnExceptionAttribute : Attribute
{
}
public class LogToWarnOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Instruction GetMethodBodyFirstInstruction()
{
if (Method.IsConstructor)
{
return body.Instructions.First(i => i.OpCode == OpCodes.Call).Next;
return body.Instructions.First(_ => _.OpCode == OpCodes.Call).Next;
}
return body.Instructions.First();
}
Expand Down
4 changes: 1 addition & 3 deletions NServiceBus/Anotar.NServiceBus/LogMinimalMessageAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NServiceBus;
/// Used to suppress message prefixing.
/// </summary>
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)]
public class LogMinimalMessageAttribute : Attribute
{
}
public class LogMinimalMessageAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NServiceBus;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Debug</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToDebugOnExceptionAttribute : Attribute
{
}
public class LogToDebugOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NServiceBus;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Error</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToErrorOnExceptionAttribute : Attribute
{
}
public class LogToErrorOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NServiceBus;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Fatal</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToFatalOnExceptionAttribute : Attribute
{
}
public class LogToFatalOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NServiceBus;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Info</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToInfoOnExceptionAttribute : Attribute
{
}
public class LogToInfoOnExceptionAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ namespace Anotar.NServiceBus;
/// If an <see cref="Exception"/> occurs in the applied method then log it to <c>Warn</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
public class LogToWarnOnExceptionAttribute : Attribute
{
}
public class LogToWarnOnExceptionAttribute : Attribute;
2 changes: 1 addition & 1 deletion Serilog/Anotar.Serilog.Fody/OnExceptionProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Instruction GetMethodBodyFirstInstruction()
{
if (Method.IsConstructor)
{
return body.Instructions.First(i => i.OpCode == OpCodes.Call).Next;
return body.Instructions.First(_ => _.OpCode == OpCodes.Call).Next;
}
return body.Instructions.First();
}
Expand Down
Loading

0 comments on commit 7a88fc8

Please sign in to comment.