示例#1
0
文件: Util.cs 项目: MrJoe/lat
        public static void getChildren(Connection conn, string name, StringBuilder sb)
        {
            LdapEntry[] children = conn.Data.GetEntryChildren(name);

            if (children == null)
            {
                return;
            }

            foreach (LdapEntry cle in children)
            {
                LDIF cldif = new LDIF(cle);
                sb.AppendFormat("{0}\n", cldif.Export());

                getChildren(conn, cle.DN, sb);
            }
        }
示例#2
0
文件: Util.cs 项目: MrJoe/lat
        static string export(Connection conn, string dn)
        {
            StringBuilder data = new StringBuilder();

            LdapEntry le    = (LdapEntry)conn.Data.GetEntry(dn);
            LDIF      _ldif = new LDIF(le);

            data.AppendFormat("{0}\n", _ldif.Export());

            LdapEntry[] children = conn.Data.GetEntryChildren(dn);

            foreach (LdapEntry cle in children)
            {
                LDIF cldif = new LDIF(cle);
                data.AppendFormat("{0}\n", cldif.Export());

                getChildren(conn, cle.DN, data);
            }

            return(data.ToString());
        }
示例#3
0
文件: Util.cs 项目: MrJoe/lat
        static string export(Connection conn, string dn)
        {
            StringBuilder data = new StringBuilder();

            LdapEntry le = (LdapEntry) conn.Data.GetEntry (dn);
            LDIF _ldif = new LDIF (le);

            data.AppendFormat ("{0}\n", _ldif.Export());

            LdapEntry[] children = conn.Data.GetEntryChildren (dn);

            foreach (LdapEntry cle in children) {
                LDIF cldif = new LDIF (cle);
                data.AppendFormat ("{0}\n", cldif.Export());

                getChildren (conn, cle.DN, data);
            }

            return data.ToString ();
        }
示例#4
0
文件: Util.cs 项目: MrJoe/lat
        public static void getChildren(Connection conn, string name, StringBuilder sb)
        {
            LdapEntry[] children = conn.Data.GetEntryChildren (name);

            if (children == null)
                return;

            foreach (LdapEntry cle in children) {
                LDIF cldif = new LDIF (cle);
                sb.AppendFormat ("{0}\n", cldif.Export());

                getChildren (conn, cle.DN, sb);
            }
        }