Example #1
0
        public static bool UseNativeOverloads(IMethod me)
        {
            if (me.IsPropertyAccessor())
            {
                return(true);
            }
            if (me.IsEventAccessor())
            {
                return(true);
            }
            JMethodAttribute jma = me.GetMetadata <JMethodAttribute>(true);

            if (jma != null && jma._NativeOverloads != null)
            {
                return(jma._NativeOverloads.GetValueOrDefault());
            }

            var t = me.GetDeclaringTypeDefinition();

            if (t != null)
            {
                return(UseNativeOverloads(t));
            }
            else
            {
                return(false); //Not declared on method, not declared on type
            }
        }
Example #2
0
        public static bool ExtensionImplementedInInstance(IMethod me)
        {
            JMethodAttribute jma = me.GetMetadata <JMethodAttribute>();

            return((jma == null) ? false : jma.ExtensionImplementedInInstance);
        }
Example #3
0
        public static string GetNativeCode(IMethod me)
        {
            JMethodAttribute jma = me.GetMetadata <JMethodAttribute>();

            return((jma == null) ? null : jma.Code);
        }