Castle.DynamicProxy.Generators.ClassProxyGenerator.EnsureDoesNotImplementIProxyTargetAccessor C# (CSharp) 메소드

EnsureDoesNotImplementIProxyTargetAccessor() 개인적인 메소드

private EnsureDoesNotImplementIProxyTargetAccessor ( Type type, string name ) : void
type System.Type
name string
리턴 void
		private void EnsureDoesNotImplementIProxyTargetAccessor(Type type, string name)
		{
			if (!typeof(IProxyTargetAccessor).IsAssignableFrom(type))
			{
				return;
			}
			var message =
				string.Format(
					"Target type for the proxy implements {0} which is a DynamicProxy infrastructure interface and you should never implement it yourself. Are you trying to proxy an existing proxy?",
					typeof(IProxyTargetAccessor));
			throw new ArgumentException(message, name);
		}
	}