Skip to content

Commit

Permalink
Disable verbose logging of ArgumentWeaver
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Mar 7, 2023
1 parent 5e9beab commit 51ee7d1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/Catel.Fody/Weaving/Argument/ArgumentWeaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@

public partial class ArgumentWeaver
{
#region Constants
private delegate CustomAttribute ExpressionToAttributeFunc(MethodReference method, IList<Instruction> instructions, Instruction instruction);

private static readonly object CacheLock = new object();
#endregion

#region Fields
private static readonly Dictionary<string, ExpressionToAttributeFunc> ExpressionChecksToAttributeMappings = new Dictionary<string, ExpressionToAttributeFunc>();

private readonly TypeDefinition _typeDefinition;
private readonly MsCoreReferenceFinder _msCoreReferenceFinder;
private readonly Configuration _configuration;
#endregion

#region Constructors
public ArgumentWeaver(TypeDefinition typeDefinition, MsCoreReferenceFinder msCoreReferenceFinder,
Configuration configuration)
{
Expand All @@ -32,12 +27,10 @@ public ArgumentWeaver(TypeDefinition typeDefinition, MsCoreReferenceFinder msCor
_msCoreReferenceFinder = msCoreReferenceFinder;
_configuration = configuration;
}
#endregion

#region Methods
public void Execute()
{
FodyEnvironment.WriteDebug($"\tExecuting '{GetType().Name}' for '{_typeDefinition.FullName}'");
//FodyEnvironment.WriteDebug($"\tExecuting '{GetType().Name}' for '{_typeDefinition.FullName}'");

foreach (var method in _typeDefinition.Methods)
{
Expand All @@ -63,7 +56,7 @@ private void ProcessMethod(MethodDefinition method)
Collection<Instruction> instructions = null;

var methodFullName = method.GetFullName();
FodyEnvironment.WriteDebug($"\tExecuting '{GetType().Name}' for '{methodFullName}'");
//FodyEnvironment.WriteDebug($"\tExecuting '{GetType().Name}' for '{methodFullName}'");

// Step 1) Convert attributes
// TODO: how to handle async/await here?
Expand Down Expand Up @@ -313,6 +306,5 @@ private bool IsOperandSupportedForArgumentChecks(object operand)

return true;
}
#endregion
}
}

0 comments on commit 51ee7d1

Please sign in to comment.