Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include DeclaringType.Name for nested types when generating explicit implementation names #692

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JelleKerkstra
Copy link

This PR resolves the DynamicProxyException Duplicate element: Castle.DynamicProxy.Generators.MetaMethod when generating a proxy that implements the following interfaces due to the nested classes.
In the current implementation, only the namespace, type name and method name are considered. In this PR, the declaring type names are also used when generating explicit interface implementations due to matching method names.

public static class OuterWrapper
{
	public static class InnerWrapperA
	{
		public interface ISharedName
		{
			void M();
		}
	}

	public static class InnerWrapperB
	{
		public interface ISharedName
		{
			void M();
		}
	}

	public static class InnerWrapperC
	{
		public interface ISharedName
		{
			void M();
		}
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant