protected override MetaMethod GetMethodToGenerate(MethodInfo method, IProxyGenerationHook hook, bool isStandalone)
        {
            if (method.IsAccessible() == false)
            {
                return null;
            }

            var proxyable = AcceptMethod(method, false, hook);
            return new MetaMethod(method, method, isStandalone, proxyable, false);
        }
Example #2
0
		protected override MetaMethod GetMethodToGenerate(MethodInfo method, IProxyGenerationHook hook, bool isStandalone)
		{
			if (method.IsAccessible() == false)
			{
				return null;
			}

			var accepted = AcceptMethod(method, true, hook);
			if (!accepted && !method.IsAbstract)
			{
				//we don't need to do anything...
				return null;
			}

			return new MetaMethod(method, method, isStandalone, accepted, !method.IsAbstract);
		}
        protected override MetaMethod GetMethodToGenerate(MethodInfo method, IProxyGenerationHook hook, bool isStandalone)
        {
            if (method.IsAccessible() == false)
            {
                return null;
            }

            if (onlyProxyVirtual && IsVirtuallyImplementedInterfaceMethod(method))
            {
                return null;
            }

            var methodOnTarget = GetMethodOnTarget(method);

            var proxyable = AcceptMethod(method, onlyProxyVirtual, hook);
            return new MetaMethod(method, methodOnTarget, isStandalone, proxyable, methodOnTarget.IsPrivate == false);
        }
		protected override MetaMethod GetMethodToGenerate(MethodInfo method, IProxyGenerationHook hook, bool isStandalone)
		{
			if(method.IsFamily)
			{
				// we can't proxy protected methods like this on Silverlight
				return null;
			}
			if (method.IsAccessible() == false)
			{
				return null;
			}

			var accepted = AcceptMethod(method, true, hook);
			if (!accepted && !method.IsAbstract)
			{
				//we don't need to do anything...
				return null;
			}

			return new MetaMethod(method, method, isStandalone, accepted, hasTarget: true);
		}