restsharp/RestSharp — pull request #360 by scottschluer (2013-03-22 22:42:20+00:00)
Title: Added support for attribute-based serialization for properties containing IList properties

This is my first pull request, so hopefully I'm doing this right. :)

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.