Beispiel #1
0
        protected override async Task WriteContentsAsync(LDAPWriter writer)
        {
            var opWriter = new LDAPWriter();

            await opWriter.WriteAsync(DistinguishedName);

            await opWriter.WriteAsync((int)Scope);

            await opWriter.WriteAsync((int)Aliasing);

            await opWriter.WriteAsync(SizeLimit);

            await opWriter.WriteAsync(TimeLimit);

            await opWriter.WriteAsync(TypesOnly);

            // Encode filters here
            await opWriter.WriteAsync(Filter);

            // Attributes
            if (Attributes == null || Attributes.Length == 0)
            {
                await opWriter.WriteNullAsync();
            }
            else
            {
                var atWriter = new LDAPWriter();
                foreach (var s in Attributes)
                {
                    await atWriter.WriteAsync(s);
                }

                await opWriter.WriteAsync(atWriter);
            }

            await writer.WriteAsync(opWriter, 3, EncodingScope.APPLICATION);
        }
Beispiel #2
0
 protected override async Task WriteContentsAsync(LDAPWriter writer) =>
 await writer.WriteNullAsync(2, EncodingScope.APPLICATION);