SamboyCoding / Tomlet

Zero-Dependency, model-based TOML De/Serializer for .NET
MIT License
155 stars 29 forks source link

Add (de)serialization for Property/Records #8

Closed M3rs closed 3 years ago

M3rs commented 3 years ago

Properties have a backing field named like 'k__BackingField' which can get used for properties and record types.

i.e.

public class MyClass
{
    public string MyString { get; set; }
}

When looking at typeof(MyClass), there will be a private field private string <MyString>k__BackingField.

SamboyCoding commented 3 years ago

Other than those minor details, nice PR! Very appreciated, and thanks for writing additional tests too.

M3rs commented 3 years ago

Ah, good call out on the BindingFlags. Cleaned up that and the gitignore.

SamboyCoding commented 3 years ago

Alright, merging this now, will try and get a release out tonight.

SamboyCoding commented 3 years ago

As a slight aside, your local git email doesn't match your github one, so these commits aren't attributed to you.

M3rs commented 3 years ago

Ah, I'll get that sorted, thanks

SamboyCoding commented 3 years ago

This is now live in 2.0.0. Sorry for the delay in getting this out in a release!