コード例 #1
0
		protected override MetaMethod GetMethodToGenerate(IMethodInfo 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);
		}
コード例 #2
0
        protected override MetaMethod GetMethodToGenerate(IMethodInfo 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));
        }
コード例 #3
0
		protected override MetaMethod GetMethodToGenerate(IMethodInfo 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);
		}
コード例 #4
0
        protected override MetaMethod GetMethodToGenerate(IMethodInfo 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(IMethodInfo 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);
		}
コード例 #6
0
        protected override MetaMethod GetMethodToGenerate(IMethodInfo 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));
        }
コード例 #7
0
		protected override MetaMethod GetMethodToGenerate(IMethodInfo 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);
		}
コード例 #8
0
        protected override MetaMethod GetMethodToGenerate(IMethodInfo 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));
        }