public static SimplePagedResultsControl ExtractControl(ICollection <byte> buffer)
        {
            var result = new SimplePagedResultsControl();

            result.Criticality = DERBoolean.Extract(buffer);
            var controlValue = DEROctetString.Extract(buffer);

            result.ControlValue = RealSearchControlValue.Extract(controlValue.Payload);
            return(result);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public static ModifyDNRequest Extract(ICollection <byte> buffer)
        {
            var result = new ModifyDNRequest();

            result.Entry        = DEROctetString.Extract(buffer);
            result.NewRDN       = DEROctetString.Extract(buffer);
            result.DeleteOldRDN = DERBoolean.Extract(buffer);
            var newSuperior = new DEROctetString();

            newSuperior.ExtractTagAndLength(buffer);
            if (newSuperior.Length > 0)
            {
                var valueBuffer = buffer.Dequeue(newSuperior.Length);
                newSuperior.Value  = Encoding.ASCII.GetString(valueBuffer.ToArray());
                result.NewSuperior = newSuperior;
            }

            return(result);
        }