My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 355: AutofacContrib.DynamicProxy2: Internal interfaces are not intercepted (and no exception)
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  travis.illig
Closed:  Dec 2012


Sign in to add a comment
 
Reported by lars.and...@gmail.com, Feb 8, 2012
What steps will reproduce the problem?

            var builder = new ContainerBuilder();
                builder
                .RegisterType<SomeConcreteType>()
                .EnableInterfaceInterceptors()
                .InterceptedBy(typeof(SomeInterceptor))
                .As<ISomeInternalInterface>();

            builder.Build().Resolve<ISomeInternalInterface>().SomeMethod(); // <-- will not be intercepted


DynamicProxy2 is not able to proxy internal interfaces. I guess that's why the interception doesn't work. But an exception would be nice, because the interception just silently disables itself :)


Autofac/Contrib v 2.5.2.830
.NET 4.0



Sep 20, 2012
Project Member #1 travis.illig
(No comment was entered for this change.)
Summary: AutofacContrib.DynamicProxy2: Internal interfaces are not intercepted (and no exception)
Sep 21, 2012
Project Member #2 travis.illig
(No comment was entered for this change.)
Labels: Module-Extras-DynamicProxy2
Dec 13, 2012
Project Member #3 travis.illig
Looks like it was checking to ensure the interception was for interfaces but not that it was also visible. I've updated this so you'll get an exception when you resolve an incorrectly registered component and the exception explains what to check for. Since the actual proxy isn't generated until resolve time, I can't really provide a container build-time exception.
Status: Started
Owner: travis.illig
Dec 13, 2012
Project Member #4 travis.illig
This issue was closed by revision 53a4efafa8d7.
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting