LoadProperty overloads: changed between 3.X and 3.6 ?

LoadProperty overloads: changed between 3.X and 3.6 ?

Old forum URL: forums.lhotka.net/forums/t/6080.aspx


lukky posted on Sunday, January 04, 2009

Hi,

I have not done any real work with CSLA 3.X, and just recently started to work with 3.6.

I have read a few posts on this forum suggesting that at some point it was possible to use the following:

LoadProperty<T,S>(var1, var2);

Also, the CodeSmith templates on CSLAContrib generate that kind of code.

Now, moving on to 3.6, this construct doesn't seem to be allowed anymore.

Am I correct about this change ?

Thank you.


RockfordLhotka replied on Monday, January 05, 2009

The Set/Get/Load/ReadProperty() method signatures did change a little bit, so type inference works.

The big change is that the LoadProperty<P,F>() overloads are now renamed to LoadPropertyConvert<P,F>() to eliminate ambiguity.

This means you can do:

LoadProperty(NameProperty, "Fred")

and the compiler will resolve the type parameters for you. But you still need to provide the type parameters for LoadPropertyConvert().

lukky replied on Monday, January 05, 2009

Thanks Rocky,

This is what I get when I work late on a Sunday night...

After posting, I found the change in the changelog for 3.6, but the delay for post deletion had expired Big Smile [:D]

I have modified the CSLAContrib CodeSmith templates to reflect that change.

On a related note, do you happen to know if Rick Supit is still actively working on those templates ? I'd be glad to give him a hand, but I've tried to e-mail him with no success.

Regards.

Copyright (c) Marimer LLC