示例#1
0
        public String ListDir(String match)
        {
            Regex re = null;

            if (match != null)
            {
                re = new Regex(match);
            }

            StringBuilder sb = new StringBuilder();

            foreach (TypeDictionary dic in SubTypeDictionary.Values)
            {
                String name = dic.Name;
                if (re != null)
                {
                    if (!re.IsMatch(name))
                    {
                        continue;
                    }
                }
                sb.AppendLine("N:\t" + Context.EnsureAtLeastLength(name, 20) + "\t" + dic.FullName);
            }
            return(sb.ToString());
        }
示例#2
0
        public String ListType(String match)
        {
            Regex re = null;

            if (match != null)
            {
                re = new Regex(match);
            }

            StringBuilder sb = new StringBuilder();

            foreach (Type t in Types.Values)
            {
                String name = t.Name;
                if (re != null)
                {
                    if (!re.IsMatch(name))
                    {
                        continue;
                    }
                }

                String typeClass = String.Empty;

                if (t.IsClass)
                {
                    typeClass += "C";
                }
                else
                {
                    if (t.IsInterface)
                    {
                        typeClass += "I";
                    }
                    else
                    {
                        typeClass += "S";
                    }
                }

                sb.AppendLine(typeClass + ":\t" + Context.EnsureAtLeastLength(name, 20) + "\t" + t.FullName);
            }
            return(sb.ToString());
        }