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
Size:
Color:
Good question. Just answered it here:
Home - Community Components >
Extension MethodsIn 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. :)
Size:
Color: