Hello!

I use nhibernate, and after switching to nhibernate 3.0, this code now
throws an exception:
(" 'this' type cannot be an interface itself.")


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        private object CreateChannelProxy(Type serviceContract,
IClientChannel channel)
                {
                        lock(_proxyGenerator)
                        {
                                // get list of interceptors if not yet created
                                if (_interceptors == null)
                                {
                                        _interceptors = new 
List<IInterceptor>();
                                        ApplyInterceptors(_interceptors);
                                }

                                var options = new ProxyGenerationOptions();

                object rc = null;
                try
                {
                    rc =
_proxyGenerator.CreateInterfaceProxyWithTarget(
                serviceContract,
                new[] { serviceContract, typeof(IDisposable) },
               channel,
                options,
                _interceptors.ToArray());
                }
                catch (Exception e)
                {

                    throw;
                }

                return rc;
                        }
                }

}
//////////////////////////////////////////////////////////////////////

 It used to work with:

castle core :                       1.1
castle dynamic proxy 2:      2.1


now broken with:

castle core :                       1.2
castle dynamic proxy 2:      2.2


Any ideas? From googling, it looks like the problem is that channel is
already a proxy, and I am then trying to proxy a proxy.


-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to castle-project-us...@googlegroups.com.
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to