Can't find GetAllDataForSymbol
Author: mjj3
Creation Date: 10/21/2013 7:12 PM
profile picture

mjj3

#1
Hi,
I'm a bit confused on the GetAllDataForSymbol method. The Wiki says it should be a method off of the Bars.Symbol object. but it doesn't seem to be there. Also, in Visual Studio the Symbol is just a string property in the Bars object (not an object itself). Any help would be appreciated.
profile picture

Cone

#2
It's an extension method supplied by Community.Components. In short, you have to install the Community.Components extension and add a using Community.Components;

Edit: actually you don't need the "using" as Eugene points out below..
profile picture

mjj3

#3
Thats how I use to use it but the wiki says that's obsolete (see link below) and to use this new method.

http://www2.wealth-lab.com/WL5Wiki/GetAllDataForSymbol.ashx
profile picture

Eugene

#4
The beauty is that to use an extension method, you don't have to add a using Community.Components; However, the version of the C.Components library must be actual (update using the Extension Manager if it's not).

Also, don't expect to find GetAllDataForSymbol (or any other extension method or any method from a 3rd party DLL for that matter) on IntelliSense in Wealth-Lab: it does not work. That's a known limitation. In Visual Studio though, it does work after following steps below.

The Bars.Symbol property is of course a string and will remain it with or without extension methods. Follow the link above supplied by Cone to get familiar with extension methods, as it's a relatively new concept (C# 3.0).

QUOTE:
Also, in Visual Studio the Symbol is just a string property in the Bars object (not an object itself).

This is not a supported use case for extension methods. To use an extension method in your .NET 4.x-based Visual Studio solution, there has to be a using System.Linq (added by default), plus the namespace the method comes from:

CODE:
Please log in to see this code.

After adding a reference to WealthLab.Components.Comunity.dll in your solution, you'll be able to find GetAllDataForSymbol on IntelliSense in Visual Studio. To find out where a particular extension method is located, browse the open source code of C.Components. Or, simply use old syntax where available.
profile picture

mjj3

#5
Thanks a ton for the detailed explanation Eugene.
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).