Uno.CodeGen
Uno.CodeGen copied to clipboard
Generate helpers for immutable collections/dictionaries
Feature request
Should generate helpers to manage collections and dictionaries on immutable entities.
Example
Declaration
[GeneratedImmutable]
public class MyClass
{
public ImmutableArray<string> Favorites { get; }
public ImmutableDictionary<string, string> Settings { get; }
}
Usage
public void Do()
{
var a = new MyClass();
var b = a.WithAddFavorite("ID01");
var c = b.WithSetting("owner", "uno platform");
}
Features
- Should support implementations of
IImmutableList<T>
,IImmutableSet<T>
,IImmutableQueue<T>
,IImmutableStack<T>
,IImmutableDictionary<TKey, TValue>
. - Should handle
null