public DirectoryRootInfo(string protocol, string server, ushort port, LdapPath path)
 {
     _protocol = protocol;
     _server = server;
     _port = port;
     _path = path;
 }
示例#2
0
        public static LdapPath Parse(string path)
        {
            int      index  = 0;
            int      max    = path.Length;
            LdapPath result = new LdapPath();

            while (index < path.Length)
            {
                result._items.AddLast(LdapPathItem.Parse(path, ref index));
            }

            return(result);
        }
示例#3
0
        public LdapPath GetChildPart()
        {
            LinkedListNode <LdapPathItem> current = _items.First;
            LdapPath path = new LdapPath();

            while (current != null)
            {
                if (current.Value.IsDCPrefix)
                {
                    break;
                }

                path._items.AddLast(current.Value);
                current = current.Next;
            }

            return(path);
        }
示例#4
0
        public LdapPath GetDomainPart()
        {
            LinkedListNode <LdapPathItem> current = _items.Last;
            LdapPath path = new LdapPath();

            while (current != null)
            {
                if (!current.Value.IsDCPrefix)
                {
                    break;
                }

                path._items.AddFirst(current.Value);
                current = current.Previous;
            }

            return(path);
        }
示例#5
0
        public bool IsChildOf(LdapPath parent)
        {
            LinkedListNode <LdapPathItem> current = _items.Last;
            LinkedListNode <LdapPathItem> other   = parent._items.Last;

            while (current != null && other != null)
            {
                if (!other.Value.Equals(current.Value))
                {
                    return(false);
                }

                other   = other.Previous;
                current = current.Previous;

                if (other == null)
                {
                    return(true);
                }
            }

            return(false);
        }
示例#6
0
文件: LdapPath.cs 项目: razaraz/Pscx
        public bool IsChildOf(LdapPath parent)
        {
            LinkedListNode<LdapPathItem> current = _items.Last;
            LinkedListNode<LdapPathItem> other = parent._items.Last;

            while (current != null && other != null)
            {
                if (!other.Value.Equals(current.Value))
                {
                    return false;
                }

                other = other.Previous;
                current = current.Previous;

                if (other == null)
                {
                    return true;
                }
            }

            return false;
        }
示例#7
0
文件: LdapPath.cs 项目: razaraz/Pscx
        public LdapPath GetDomainPart()
        {
            LinkedListNode<LdapPathItem> current = _items.Last;
            LdapPath path = new LdapPath();

            while (current != null)
            {
                if (!current.Value.IsDCPrefix)
                {
                    break;
                }

                path._items.AddFirst(current.Value);
                current = current.Previous;
            }

            return path;
        }
示例#8
0
文件: LdapPath.cs 项目: razaraz/Pscx
        public LdapPath GetChildPart()
        {
            LinkedListNode<LdapPathItem> current = _items.First;
            LdapPath path = new LdapPath();

            while (current != null)
            {
                if (current.Value.IsDCPrefix)
                {
                    break;
                }

                path._items.AddLast(current.Value);
                current = current.Next;
            }

            return path;
        }
示例#9
0
文件: LdapPath.cs 项目: razaraz/Pscx
        public static LdapPath Parse(string path)
        {
            int index = 0;
            int max = path.Length;
            LdapPath result = new LdapPath();

            while (index < path.Length)
            {
                result._items.AddLast(LdapPathItem.Parse(path, ref index));
            }

            return result;
        }
示例#10
0
文件: LdapPath.cs 项目: razaraz/Pscx
 static LdapPath()
 {
     RootDSE = new LdapPath();
     RootDSE._items.AddFirst(new LdapPathItem("RootDSE"));
 }
示例#11
0
 static LdapPath()
 {
     RootDSE = new LdapPath();
     RootDSE._items.AddFirst(new LdapPathItem("RootDSE"));
 }
示例#12
0
 public DirectoryRootInfo(string protocol, LdapPath path)
     : this(protocol, null, 0, path)
 {
 }