LeftType as Unkown Type (Object Type)

Nov 2, 2011 at 2:02 PM

Is possible to acheive something like that with Glue?:

var mapping = new Mapping<LeftType, RightType>();

where LeftType is an Object Type that I know it has to be a similar structure than RightType. In other words, LeftType must to be a known type?

Nov 2, 2011 at 6:47 PM

I am not sure if I understand the question.

Is the LeftType known at compile time? in that case, Glue can be used (just check the examples linked from the front page here).

If you're talking about resolving the types at run-time, mapping whatever properties that have the same name, then no, Glue does not support that at the moment.

Or did you mean something else?

Nov 3, 2011 at 8:39 AM

Tx for your reply.

Precisely, it's at run-time. I've tried to pass an object as LeftType but Glue just creates another RightType object with same structure but with no data inside.

I'll try it with "dynamic" type.

See: http://msdn.microsoft.com/en-us/library/dd264736.aspx

Tx a lot.