상속: IObjectBase
예제 #1
0
        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));
        }
예제 #2
0
파일: Variable.cs 프로젝트: snake5/sgscript
        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 );
        }