Ejemplo n.º 1
0
        private static string[] GetMembers(object obj, bool showClr)
        {
            var dir = showClr ? ClrModule.DirClr(obj) : ClrModule.Dir(obj);
            int len = dir.__len__();

            string[] result = new string[len];
            for (int i = 0; i < len; i++)
            {
                Assert.IsTrue(dir[i] is string);
                result[i] = dir[i] as string;
            }
            return(result);
        }
Ejemplo n.º 2
0
        internal static IList <string> DirHelper(object obj, bool showClr)
        {
            NamespaceTracker nt = obj as NamespaceTracker;

            if (nt != null)
            {
                return(nt.GetMemberNames());
            }

            var dir = showClr ? ClrModule.DirClr(obj) : ClrModule.Dir(obj);
            int len = dir.__len__();

            string[] result = new string[len];
            for (int i = 0; i < len; i++)
            {
                // TODO: validate
                result[i] = dir[i] as string;
            }
            return(result);
        }