This project is read-only.

Flattened to Hierarchical

Feb 19, 2014 at 4:49 PM
I'd like to map from a flattened object to a hierarchical object based on a simple naming convention. For example:
public class FlatObject {
    public string Name__FirstName { get; set; }
    public string Name__MiddleName { get; set; }
    public string Name__LastName { get; set; }
}

public class HierarchicalObject {
    public SubObject Name { get; set; }
}

public class SubObject {
    public string FirstName { get; set; }
    public string MiddleName { get; set; }
    public string LastName { get; set; }
}
The simple naming convention is the double-underscore within the FlattenedObject.
How would I accomplish this using EmitMapper?