using System; using System.IO; namespace Unosquare.Swan.Networking.Ldap { /// /// Represents an Ldap Modify Request. ///
  /// ModifyRequest ::= [APPLICATION 6] SEQUENCE {
  /// object          LdapDN,
  /// modification    SEQUENCE OF SEQUENCE {
  /// operation       ENUMERATED {
  /// add     (0),
  /// delete  (1),
  /// replace (2) },
  /// modification    AttributeTypeAndValues } }
  /// 
///
/// /// internal sealed class RfcModifyRequest : Asn1Sequence, IRfcRequest { public RfcModifyRequest(String obj, Asn1SequenceOf modification) : base(2) { this.Add(obj); this.Add(modification); } public Asn1SequenceOf Modifications => (Asn1SequenceOf)this.Get(1); public override Asn1Identifier GetIdentifier() => new Asn1Identifier(LdapOperation.ModifyRequest); public String GetRequestDN() => ((Asn1OctetString)this.Get(0)).StringValue(); } internal class RfcModifyResponse : RfcLdapResult { public RfcModifyResponse(Stream stream, Int32 len) : base(stream, len) { } public override Asn1Identifier GetIdentifier() => new Asn1Identifier(LdapOperation.ModifyResponse); } }