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.

Support System.Collections.Immutable types

See original GitHub issue

Support collection types in System.Collections.Immutable as mapping target types. Eg. Mapperly should be able to implement a mapping from an IEnumerable<long> to an ImmutableList<int>.

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
latonzcommented, Apr 16, 2023

https://github.com/riok/mapperly/pull/305 implements support for the following immutable collections:

  • ImmutableList<T>
  • ImmutableArray<T>
  • ImmutableHashSet<T>
  • ImmutableQueue<T>
  • ImmutableSortedSet<T>

Still missing:

  • ImmutableDictionary<TKey, TValue>
  • ImmutableSortedDictionary<TKey,TValue>

Thanks to @TimothyMakkison for the contribution 🎉

1reaction
latonzcommented, Mar 28, 2023

@jamesfoster this could probably be a new feature of Mapperly. However, I think it adds a lot of complexity and I’m not sure if it justifies the added complexity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

System.Collections.Immutable Namespace
Represents an immutable list, which is a strongly typed list of objects that can be accessed by index. NuGet package: System.Collections.
Read more >
System.Collections.Immutable 7.0.0
This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections.
Read more >
.NET Framework - Immutable Collections | ...
An immutable collection is a collection of instances that preserves its structure all the time and disallows element-level assignments, while still offering ...
Read more >
How to use immutability in C# | InfoWorld
Immutable collections are those whose members cannot change once they have been created. The System.Collections.Immutable namespace comprises ...
Read more >
Support for System Immutable collection types · Issue #81
The System.Collections.Immutable namespace contains immutable collection types. Given the usefulness of immutable types for strong usage ...
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