public static Variable CreateStaticDict(Context ctx, Type type) { int items = 0; MethodInfo[] methods = type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly); foreach (MethodInfo mi in methods) { if (mi.GetCustomAttributes(typeof(HideMethod), true).Length != 0) { continue; } DNMethod dnm = new DNMethod(ctx, mi); ctx.Push(mi.Name); ctx.Push(dnm); items += 2; } return(ctx.DictVar(items)); }
public static Variable CreateStaticDict( Context ctx, Type type ) { int items = 0; MethodInfo[] methods = type.GetMethods( BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly ); foreach( MethodInfo mi in methods ) { if( mi.GetCustomAttributes( typeof(HideMethod), true ).Length != 0 ) continue; DNMethod dnm = new DNMethod( ctx, mi ); ctx.Push( mi.Name ); ctx.Push( dnm ); items += 2; } return ctx.DictVar( items ); }