jagregory/plant — pull request #1 by jagregory (2012-02-03 04:09:46+00:00)
Title: Support strongly typed Define and Create methods

This has been useful for me when working in situations where intellisense is useful, or the properties are changing fairly frequently; the anonymous objects work nicely, but R# doesn't pick up that they're actually representing the properties on another object.

> You can now define blueprints (and create objects too) using the following syntax:
>
> p.DefinePropertiesOf(new Person {
> FirstName = "James"
> });
> p.Create(new Person { FirstName = "James" });
>
> This approach is strongly typed, and prevents some of the typo and refactoring induced errors that can occur from using anonymous objects. Obviously, this approach is only applicable if your object has a default constructor (and doesn't do anything nasty in there).