Fei Xu
Fei Xu
I have a method convert ContactEntity to Contact for save or update graph api contact. here is the code snippet, for the assign business address code "contact.BusinessAddress = businessAddress", if...
> Any chance the code below works out? This way you do not need to have if statements and can set only when needed instead of setting null properties. >...
```c# public interface IService { void DoWork(); } public class Service : IService { public void DoWork() { Console.WriteLine("Service is doing work."); } } public class ServiceDecorator(IService decoratedService) : IService...
ok, question, Is it possible register interceptor on decorator for now?
I try this ```c# builder.RegisterType() .EnableInterfaceInterceptors() .InterceptedBy(typeof(LoggingInterceptor)); ``` but the Interceptor dose not apply. still in trying if i can make it working, any suggestion? thanks.
builder.RegisterDecorator() return void, so we can not use builder.RegisterDecorator().EnableInterfaceInterceptors() I try this still not working, may be it does not support now. the interceptor does not take affect use the...
I'm not familiar with the source code of Autofac.Extras.DynamicProxy, I think add an .InterceptedOnDecorator() method like this ```C# builder.RegisterType().As().EnableInterfaceInterceptors().InterceptedBy(typeof(LoggingInterceptor)) .InterceptedOnDecorator() ``` use this it won't break the current API, and...
```C# public static IRegistrationBuilder EnableInterfaceInterceptors( this IRegistrationBuilder registration, ProxyGenerationOptions? options = null, bool createProxyOnDecorator = false) { ArgumentNullException.ThrowIfNull(registration); if (createProxyOnDecorator) { registration.OnActivated(e => { var componentContext = (ResolveRequestContext)e.Context; CreateProxy(componentContext); });...
already submit 2 pull request one is on autofac, add these extension methods will help remove the duplicate code in the second pull request on Autofac.Extras.DynamicProxy. any feed back let...
does my change broken the build, on my side all the test passed? looks the unit test failed not related to my code