AspectCore-Framework icon indicating copy to clipboard operation
AspectCore-Framework copied to clipboard

AspectCore is an AOP-based cross platform framework for .NET Standard.

Results 37 AspectCore-Framework issues
Sort by recently updated
recently updated
newest added

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) Welcome to [Renovate](https://togithub.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin. 🚦 To activate Renovate, merge this Pull Request....

升级了7.0版本的EasyNetQ, 注入IAdvancedBus会报错. 原因是7.0版本的ISerializer的BytesToMessage参数加个in修饰符. 如下图 ![image](https://user-images.githubusercontent.com/22828478/183370867-87e7d3d0-55ec-4f67-82fb-f39c3800baca.png) 然后就报错了 ![image](https://user-images.githubusercontent.com/22828478/183371019-2d91b6e5-9752-4470-b622-cd165dc9f424.png) 对Emit不是很熟悉, 研究了很久, 无法解决, 官方有解决方案吗 更新. - .Net 6环境才会报这个错误

你好,想要请教一下 我在.net core专案中 使用Scutor套件做装饰者模式的DI 套用之后 就无法被AspectCore的属性拦截生成Proxy的class 想问你们有遇到过类似的问题吗 谢谢 專案連結 https://github.com/frank58246/AOE_Test ![未命名](https://user-images.githubusercontent.com/3856292/179384689-be58d8ce-2e13-4da3-8f39-df9fbb2248cb.png) ![未命名1 1](https://user-images.githubusercontent.com/3856292/179384692-f4b2419a-00e2-46da-b5dd-1843b585b934.png) ![未命名1](https://user-images.githubusercontent.com/3856292/179384693-e80e5207-2eb9-417c-9b6b-783a17c702df.png) ![未命名2](https://user-images.githubusercontent.com/3856292/179384694-7bb32d43-c1f3-40c1-93d8-bd826780a07f.png)

该场景特殊,一般aop 使用场景应该佷难遇见 https://github.com/dotnetcore/AspectCore-Framework/blob/master/src/AspectCore.Core/Utils/ProxyGeneratorUtils.cs#L365 应该判断 `method.IsAbstract` ``` if (method.IsAbstract) { var methodBuilder = implTypeBuilder.DefineMethod(method.Name, InterfaceMethodAttributes, method.CallingConvention, method.ReturnType, method.GetParameters().Select(x => x.ParameterType).ToArray()); var ilGen = methodBuilder.GetILGenerator(); if (method.ReturnType != typeof(void)) { ilGen.EmitDefault(method.ReturnType); }...

bug

继承`InterceptorFactory`后重写`CreateInstance`方法提供的参数`IServiceProvider`跟项目中其他地方获取实例的`IServiceProvider`不是同一个实例 使用的版本是2.2.0 项目是Blazor Server Side

您好,我们看代码中发现以下实例生命周期作用域有冲突: ![8CD90A40-5829-4115-B1AF-F498907CA037](https://user-images.githubusercontent.com/15052182/158318464-06542ace-b056-4dc6-94d2-0c0e0f2fb58f.png) ![73341964-9964-471b-B776-AE3191E47837](https://user-images.githubusercontent.com/15052182/158318631-efecb164-1446-4dad-b1d4-09b0fa74033c.png) IPropertyInjectorFactory 接口是Scope作用域,但是InterceptorCollector作用域是Singleton单例,InterceptorCollector中引用了IPropertyInjectorFactory ,也就是在Singleton的实例中引用了Scope,这个设计是不是不合理的? `System.InvalidOperationException: Cannot consume scoped service 'AspectCore.DependencyInjection.IPropertyInjectorFactory' from singleton 'AspectCore.DynamicProxy.IInterceptorCollector'. at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteValidator.VisitScopeCache(ServiceCallSite scopedCallSite, CallSiteValidatorState state) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteValidator.VisitConstructor(ConstructorCallSite constructorCallSite, CallSiteValidatorState state)...

异常信息:IL 变量在当前本机 IP 上不可用。 (异常来自 HRESULT:0x80131304). The error code is CORDBG_E_IL_VAR_NOT_AVAILABLE, or0x80131304. `using AspectCore.Configuration; using AspectCore.Extensions.DependencyInjection; using WebApplication1; var builder = WebApplication .CreateBuilder(args); // Add services to the container. builder.Services.AddControllers();...

controller引用了一个使用了AOP的类,类中某方法抛异常出异常时(如空指针异常),异常堆栈信息最后只定位到controller调用这个类的这个方法的位置,没有定位到这个方法里发生异常的位置

- [x] add .NET6 target - [x] fix test error

I have an intercept named `TestIntercept` and it implemented `AbstractInterceptorAttribute`. ```cs public class TestIntercept : AbstractInterceptorAttribute { public override Task Invoke(AspectContext context, AspectDelegate next) { Console.WriteLine("Interceptor effect"); return context.Invoke(next); }...