Some SetPropertyValue/GetPropertyValue overloads will be deprecated

XPO Team Blog
14 December 2007

In future releases of XPO, we will deprecate certain overloads of the SetPropertyValue and GetPropertyValues in XPBaseObject. In a previous post of mine I have outlined some of the various combinations that can currently be used for property implementations in persistent classes, and the case that's the subject of this post is case 1.

There's a nice little example and an explanation of this case in the original post, but here's a quick summary. The overload in question is the one where the methods do not take a parameter for the property name. This was previously already a scenario that I marked not recommended, because of performance as well as technical issues with it. The performance issues are simply due to the additional work that needs to be done on every single property access, the technical issues I'm referring to relate to changes in .NET 2. Again, for more details about the issues we're having with this, please read this blog post or feel free to contact our support team and request any information you need.

We have since had a number of support incidents, where programmers were not aware of the implications of this particular implementation, and were wondering about various side effects. In each of those cases, the problem could be solved simply by using one of the method overloads that take the property name as a parameter. As things are, we regret that we ever introduced this seemingly comfortable way of working with the helper methods. As there are now no perceivable advantages left of this approach, we have made the following decision:

Over the next few releases, these method overloads are going to be marked obsolete, and then removed!
(Clarification: we are still talking about those overloads of SetPropertyValue and GetPropertyValue that do not take a property name as one of their parameters!)

As a result, if you are using these overloads, you will start seeing warning messages from the Obsolete attribute in one of the next XPO versions (I'm currently assuming 7.3.6, as 7.3.5 is just out the door). To solve this problem and make sure that your application does what it should (isn't it nice that at least there's some real purpose in this <g>), you will have to insert the property name into the parameter lists of all calls to SetPropertyValue and GetPropertyValue (it's always the first parameter).

Please feel free to contact us in any way if you want to discuss the matter with us, register disagreement, or if you have questions.

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Tags
Anonymous
xx

Good!

15 December 2007
Stanislaw Tristan
Stanislaw Tristan

So, please, explain WHAT overloads will be removed?

15 December 2007
Alain Bismark
Alain Bismark

The overload in question is the one where the methods do not take a parameter for the property name.

16 December 2007
Oliver Sturm (DevExpress)
Oliver Sturm (DevExpress)

Alain - thanks for pointing that out. I don't know if it wasn't clear enough in the text, I have added an additional line to that effect now.

17 December 2007
Andrew Miller
Andrew Miller

The documentation still recommends the nameless overloads (ms-help://DevExpress.NETv8.1/DevExpress.Xpo/CustomDocument2998.htm)

25 March 2008

Please login or register to post comments.