Community Components Obsolete Message
Author: ronc
Creation Date: 8/23/2013 9:31 PM
profile picture

ronc

#1
Starting perhaps a month or so ago, whenever the Wealth Lab compiler finds an error it always gives me the following error message, in addition to the actual error:

Warning CS0612....: "Community Components Utility' is obsolete
Warning CS0612....: "Community Components Utility.GetAllDataForSymbo(string, WealthLab.BarScale, int)' is obsolete

I am using this line in my code (and Synchronizing dataseries) to handle the startup issue:
Bars allDataBars = Utility.GetAllDataForSymbol( Bars.Symbol, Bars.Scale, Bars.BarInterval );

The above errors go away when I fix the actual code error but I am wondering if something else is broken in my setup. I have updated all of my add-ins/components/etc. so I cannot see what could be the problem. Any help would be appreciated.

Thanks,
Ron
profile picture

Eugene

#2
Good question. Just answered it here:

Home - Community Components > Extension Methods

In short: it's intentional, nothing is broken, legacy code works like before.

No immediate need to learn the new syntax for "C# 3.0 extension methods". Whenever a new method not available via the old syntax is added, it will have a Wiki code example illustrating how to call it anyway. But since I have marked all legacy calls with an Obsolete attribute, they will trigger a compiler warning.

C# 3.0 extension methods provide a wonderful piece of syntactic sugar, enabling to add methods to existing types without modifying the original type. The best example of extension methods are LINQ queries. Instead of memorizing those Community.Components.Utility, PositionHelper etc. classes, developers now get a static call with a terse syntax. So the migration of our library of extension methods to C# extension methods was very natural. :)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).