Ejemplo n.º 1
0
 protected virtual void ReadResponse(LdapStreamReader reader, ProtocolOperation protocol)
 {
     if (reader.NextElementIs(0x30))
     {
         int messageLength = reader.ReadElementLength();
         MessageId = reader.ReadIntElement();
         if (reader.NextElementIs((int)protocol))
         {
             int contentLength = reader.ReadElementLength();
             ReadResponseBody(reader);
         }
     }
 }
Ejemplo n.º 2
0
 protected override void ReadResponse(LdapStreamReader reader, ProtocolOperation protocol)
 {
     Results = new List <SearchResult> ();
     while (true)
     {
         if (reader.NextElementIs(0x30))
         {
             int messageLength = reader.ReadElementLength();
             MessageId = reader.ReadIntElement();
             int operation = reader.ReadByte();
             if (operation == (int)ProtocolOperation.SearchResultEntry)
             {
                 Results.Add(new SearchResult(reader));
             }
             else if (operation == (int)ProtocolOperation.SearchResultDone)
             {
                 int contentLength = reader.ReadElementLength();
                 ReadResponseBody(reader);
                 break;
             }
         }
     }
 }