restsharp/RestSharp — pull request #361 by scottschluer (2013-03-25 02:45:03+00:00)
Title: Added support for serialization for classes containing IList properties

Given the following class structure:

```csharp
public class Person
{
[SerializeAs(Name = "contact-data")]
public ContactData ContactData { get;set; }
}

public class ContactData
{
[SerializeAs(Name = "email-addresses")]
public List EmailAddresses { get; set; }
}

[SerializeAs(Name = "email-address")]
public class EmailAddress
{
[SerializeAs(Name = "address")]
public string Address { get;set; }
}
```
RestSharp's XmlSerializer returns the following XML:

```xml

my@email.com

```
**Note that the serialization of the "EmailAddress" element ignored the SerializeAs attribute.**

Code attached to fix this issue and correctly serialize class names when included as an IList<> property.