Change LdapSearchResults to IAsyncEnumerable
See original GitHub issueCan 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:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Everything is async now in 4.0.0. Closing this.
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.