<commit_before>#XSerizlier - an XML serializer that works with interfaces (!)#

##Typical Usage##

You can serialize/deserialize like this:

```C#
public class Foo
{
    public int Id { get; set; }
    public IBar Bar { get; set; }
}

[XmlInclude(typeof(Bar))] // Method one uses attributes to indicate the inheritors of the interface.
public interface IBar
{
    int Id { get; set; }
    string Value { get; set; }
}

public class Bar : IBar
{
    public int Id { get; set; }
    public string Value { get; set; }
}

public void Main()
{
    Foo foo = new Foo { Id = 1, Bar = new Bar { Id = 2, Value = "Baz" } };
    XmlSerializer<Foo> serializer = new XmlSerializer<Foo>();
    string xml = serializer.Serialize(foo);
    Foo roundTripFoo = serializer.Deserialize(xml);
}
```

Or this:
```C#
public class Foo
{
    public int Id { get; set; }
    public IBar Bar { get; set; }
}

public interface IBar
{
    int Id { get; set; }
    string Value { get; set; }
}

public class Bar : IBar
{
    public int Id { get; set; }
    public string Value { get; set; }
}

public void Main()
{
    Foo foo = new Foo { Id = 1, Bar = new Bar { Id = 2, Value = "Baz" } };
    XmlSerializer<Foo> serializer = new XmlSerializer<Foo>(typeof(Bar)); // Method two passes in the types of the inheritors to the constructor.
    string xml = serializer.Serialize(foo);
    Foo roundTripFoo = serializer.Deserialize(xml);
}
```<commit_msg>Fix README.md<commit_after>#XSerizlier - an XML serializer that works with interfaces (!)#

##Typical Usage##

You can serialize/deserialize like this:

    public class Foo
    {
        public int Id { get; set; }
        public IBar Bar { get; set; }
    }

    [XmlInclude(typeof(Bar))] // Method #1 uses attributes to indicate the inheritors of the interface.
    public interface IBar
    {
        int Id { get; set; }
        string Value { get; set; }
    }

    public class Bar : IBar
    {
        public int Id { get; set; }
        public string Value { get; set; }
    }

    public void Main()
    {
        Foo foo = new Foo { Id = 1, Bar = new Bar { Id = 2, Value = "Baz" } };
        XmlSerializer<Foo> serializer = new XmlSerializer<Foo>();
        string xml = serializer.Serialize(foo);
        Foo roundTripFoo = serializer.Deserialize(xml);
    }

Or this:

    public class Foo
    {
        public int Id { get; set; }
        public IBar Bar { get; set; }
    }

    public interface IBar
    {
        int Id { get; set; }
        string Value { get; set; }
    }

    public class Bar : IBar
    {
        public int Id { get; set; }
        public string Value { get; set; }
    }

    public void Main()
    {
        Foo foo = new Foo { Id = 1, Bar = new Bar { Id = 2, Value = "Baz" } };
        XmlSerializer<Foo> serializer = new XmlSerializer<Foo>(typeof(Bar)); // Method #2 passes in the types of the inheritors to the constructor.
        string xml = serializer.Serialize(foo);
        Foo roundTripFoo = serializer.Deserialize(xml);
    }

{'fraction_non_alphanumeric': 0.11515353805073432, 'fraction_numerical': 0.0033377837116154874, 'mean_word_length': 2.4487917146144995, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5054682', 'n_tokens_mistral': 996, 'n_tokens_neox': 939, 'n_words': 341}