Windsor Castle ProxyGenerationException

I get the following error trying to proxy an interface (without a goal) that implements two different general forms of the same common interface.

So, I have a:

public interface IGenericFoo<T> 
{
    void DoSomething<T>();
}

// this is the interface I'm trying to proxy without target
public interface IFoo : IGenericFoo<MyType1>, IGenericFoo<MyType2>
{
}

I get the following error:

Duplicate element: Castle.DynamicProxy.Generators.MetaMethod

at DefaultProxyBuilder.CreateInterfaceProxyTypeWithoutTarget

Any suggestions? Is there any workaround?

Thank.

+3
source share

Source: https://habr.com/ru/post/1780297/


All Articles