From 6dd7ca4d2a0a49ab870f3f9fc278fa8fcff2329c Mon Sep 17 00:00:00 2001 From: Hasan Manzak Date: Mon, 4 Sep 2023 00:59:21 +0300 Subject: [PATCH] aspect inheritance related fix --- .../InstructionBlockChainCreator.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/MethodBoundaryAspect.Fody/InstructionBlockChainCreator.cs b/src/MethodBoundaryAspect.Fody/InstructionBlockChainCreator.cs index 1e56eae..852f1f5 100644 --- a/src/MethodBoundaryAspect.Fody/InstructionBlockChainCreator.cs +++ b/src/MethodBoundaryAspect.Fody/InstructionBlockChainCreator.cs @@ -113,8 +113,7 @@ public NamedInstructionBlockChain CreateMethodExecutionArgsInstance( var createThisVariableBlock = CreateThisVariable(); // MethodExecutionArgs instance - var onEntryMethodTypeRef = - anyAspectTypeDefinition.Resolve().BaseType.Resolve().Methods.Single(AspectMethodCriteria.IsOnEntryMethod); + var onEntryMethodTypeRef = _referenceFinder.GetMethodReference(anyAspectTypeDefinition, AspectMethodCriteria.IsOnEntryMethod); var firstParameterType = onEntryMethodTypeRef.Parameters.Single().ParameterType; var methodExecutionArgsTypeRef = _moduleDefinition.ImportReference(firstParameterType); @@ -433,4 +432,4 @@ private static MethodReference FixMethodReference(TypeReference declaringType, M return targetMethod; } } -} \ No newline at end of file +}