public static SearchResultEntry Extract(ICollection <byte> payload) { var result = new SearchResultEntry(); result.ObjectName = DEROctetString.Extract(payload); result.PartialAttributes = DERSequence <PartialAttribute> .Extract(payload); return(result); }
public static AddRequest Extract(ICollection <byte> buffer) { var addRequest = new AddRequest(); addRequest.Entry = DEROctetString.Extract(buffer); addRequest.Attributes = DERSequence <PartialAttribute> .Extract(buffer); return(addRequest); }
public static ModifyRequest Extract(ICollection <byte> buffer) { var modifyRequest = new ModifyRequest(); modifyRequest.Object = DEROctetString.Extract(buffer); modifyRequest.Changes = DERSequence <ModifyRequestChange> .Extract(buffer); return(modifyRequest); }
public static LdapPacket Extract(ICollection <byte> buffer) { var ldapPacket = new LdapPacket(); ldapPacket.ExtractTagAndLength(buffer); ldapPacket.MessageId = DERInteger.Extract(buffer); ldapPacket.ProtocolOperation = DERProtocolOperation.Extract(buffer); if (buffer.Count > 0) { ldapPacket.Controls = DERSequence <DERControl> .Extract(buffer); } return(ldapPacket); }
public static SearchRequest Extract(ICollection <byte> buffer) { var searchRequest = new SearchRequest(); searchRequest.BaseObject = DEROctetString.Extract(buffer); searchRequest.Scope = DEREnumerated <SearchRequestScopes> .Extract(buffer); searchRequest.DeferAlias = DEREnumerated <SearchRequestDeferAliases> .Extract(buffer); searchRequest.SizeLimit = DERInteger.Extract(buffer); searchRequest.TimeLimit = DERInteger.Extract(buffer); searchRequest.TypesOnly = DERBoolean.Extract(buffer); searchRequest.Filter = SearchRequestFilter.Extract(buffer); searchRequest.Attributes = DERSequence <DEROctetString> .Extract(buffer); return(searchRequest); }