Skip to content

Add support for deconstructable parsing

Compare
Choose a tag to compare
@MichalBrylka MichalBrylka released this 23 Mar 22:37
  1. Improve text syntax provider - take from text factory
  2. add support for automatic parsing of deconstructable objects i.e.
readonly struct Address
{
    public string City { get; }
    public int ZipCode { get; }

    public Address(string city, int zipCode)
    {
        City = city;
        ZipCode = zipCode;
    }

    [UsedImplicitly]
    public void Deconstruct(out string city, out int zipCode)
    {
        city = City;
        zipCode = ZipCode;
    }
}