CSLA .NET

From Rockford Lhotka's Expert C# 2008 and VB 2008 Business Objects books

Welcome to CSLA .NET Sign in | Join | Help
in Search

LoadProperty overloads: changed between 3.X and 3.6 ?

Last post 01-05-2009, 9:04 AM by lukky. 2 replies.
Sort Posts: Previous Next
  •  01-04-2009, 10:05 PM 29463

    • lukky is not online. Last active: 07-04-2009, 6:55 AM lukky
    • Top 50 Contributor
    • Joined on 05-29-2006
    • Sherbrooke, Qc, Canada
    • Posts 85
    • Points 1,415

    LoadProperty overloads: changed between 3.X and 3.6 ?

    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.



    Luc Morin, T.P.
    http://www.stlm.ca
  •  01-05-2009, 12:19 AM 29466 in reply to 29463

    Re: LoadProperty overloads: changed between 3.X and 3.6 ?

    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().


    Rocky
  •  01-05-2009, 9:04 AM 29468 in reply to 29466

    • lukky is not online. Last active: 07-04-2009, 6:55 AM lukky
    • Top 50 Contributor
    • Joined on 05-29-2006
    • Sherbrooke, Qc, Canada
    • Posts 85
    • Points 1,415

    Re: LoadProperty overloads: changed between 3.X and 3.6 ?

    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.

    Luc Morin, T.P.
    http://www.stlm.ca
View as RSS news feed in XML

Please contact Magenic for your .NET consulting
and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Powered by Community Server, by Telligent Systems