Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Tuple<TKey, TValue> to dictionary constructor/AddRange #17

Closed
jtmueller opened this issue Jan 30, 2019 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@jtmueller
Copy link
Owner

Is your feature request related to a problem? Please describe.
We already support ValueTuple, but there are cases where support for Tuple would be convenient, particularly in F# to make an equivalent to the dict function.

Describe the solution you'd like
Constructors, AddRange, and extension methods for PooledDictionary should support IEnumerable<Tuple<TKey, TValue>>. No need to support spans of same.

@jtmueller jtmueller self-assigned this Jan 30, 2019
@jtmueller jtmueller added the enhancement New feature or request label Jan 30, 2019
@jtmueller
Copy link
Owner Author

Ended up doing this as an extension method, not a constructor. There's already quite a lot of constructors.

jtmueller added a commit that referenced this issue Jan 31, 2019
* PooledQueue: initial commit.

* With the updates to BitHelper, methods that call it no longer need to be unsafe.

* ArrayPool implementation for PooledQueue

* PooledDictionary extension method support for System.Tuple, resolves #17

* PooledQueue unit tests

* PooledQueue benchmarks, improved performance in IEnumerable constructor for PooledQueue and PooledStack

* Fixing some benchmark naming

* Adding PooledQueue benchmark results

* Adding RemoveWhere method to PooledQueue

* Removing most of the "duplicate test case" warnings from xunit

* Updating readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant