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 } }
public static bool ExtensionImplementedInInstance(IMethod me) { JMethodAttribute jma = me.GetMetadata <JMethodAttribute>(); return((jma == null) ? false : jma.ExtensionImplementedInInstance); }
public static string GetNativeCode(IMethod me) { JMethodAttribute jma = me.GetMetadata <JMethodAttribute>(); return((jma == null) ? null : jma.Code); }