question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change LdapSearchResults to IAsyncEnumerable

See original GitHub issue

Can we drop support for .netstandard 1.3 in favor to use IAsyncEnumerable?

LdapSearchResults should inherit IAsyncEnumerable to use be full async. We can use await instead of .GetAwait().GetResult() in methods like GetEnumerator (–> GetEnumeratorAsync) or the inner Next (–> NextAsync)

IAsyncEnumerable will be supported in .netstandard >= 2.1 . So this will lead into another breaking change. For compatibility reasons we can install Microsoft.Bcl.AsyncInterfaces for .netstandard 2.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dsbenghecommented, Mar 21, 2021

Everything is async now in 4.0.0. Closing this.

0reactions
dsbenghecommented, Feb 26, 2021

That functionality is like the original from 20 years ago and I just converted it to .net standard. I doubt that too many people will implement it like this these days. And I don’t think too many people are in fact using that functionality.

My thinking about this was to just remove that functionality in 4.0 and eventually offer something more raw and simple i.e. don’t assume how this is used by users. There is also an issue open about this - https://github.com/dsbenghe/Novell.Directory.Ldap.NETStandard/issues/152 - so a functional test needs to be added for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

4.0.0-beta3: Referrals exception makes other results ...
With version 3.6.0, I can do this to ignore entries with referrals: var results = ldapConnection.Search(baseDn, LdapConnection.
Read more >
When to convert IEnumerable to IAsyncEnumerable
If I have a list fully loaded into memory already, is it pointless to convert it into an IAsyncEnumerable? Well, if you want...
Read more >
T
LDAP client library for .NET Standard 1.3 up to 2.1 and NET5/NET6 - works with any LDAP protocol compatible directory server (including Microsoft...
Read more >
Async Streams with IAsyncEnumerable<T> in .NET Core 3
It exposes an enumerator that has a MoveNextAsync() method that can awaited. This means the producer can make asynchronous calls in between ...
Read more >
IAsyncEnumerable with yield in C# - Code Maze
Let's learn about IAsyncEnumerable and the way to iterate over an IEnumerable collection asynchronously with the yield keyword.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found