public LdapDistinguishedName(LdapRelativeDistinguishedName rdn, LdapDistinguishedName parent) { var rdns = new LdapRelativeDistinguishedName[parent.RDNs.Count + 1]; rdns[0] = rdn; for (int i = 0; i < parent.RDNs.Count; i++) { rdns[i + 1] = parent.RDNs[i]; } RDNs = rdns; }
internal LdapModifyDNRequest(Asn1LdapMessage message) : base(message) { var modify = message.ProtocolOp.ModifyDNRequest; Entry = new LdapDistinguishedName(modify.Entry.Span); NewRDN = new LdapRelativeDistinguishedName(modify.NewRDN.Span.LdapString()); DeleteOldRDN = modify.DeleteOldRDN; if (modify.NewSuperior.HasValue) { NewSuperior = new LdapDistinguishedName(modify.NewSuperior.Value.Span); } }